From 55bf5051adea17b5981d4f567d9e9dc6865f7af7 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Mon, 1 Jun 2015 22:43:05 +0200 Subject: Unsupport bruncles --- core/block_processor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index ca205ee86..a3ad383d0 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -364,8 +364,8 @@ func (sm *BlockProcessor) VerifyUncles(statedb *state.StateDB, block, parent *ty return UncleError("uncle[%d](%x) is ancestor", i, hash[:4]) } - if !ancestors.Has(uncle.ParentHash) { - return UncleError("uncle[%d](%x)'s parent unknown (%x)", i, hash[:4], uncle.ParentHash[0:4]) + if !ancestors.Has(uncle.ParentHash) || uncle.ParentHash == parent.Hash() { + return UncleError("uncle[%d](%x)'s parent is not ancestor (%x)", i, hash[:4], uncle.ParentHash[0:4]) } if err := sm.ValidateHeader(uncle, ancestorHeaders[uncle.ParentHash], true); err != nil { -- cgit v1.2.3