diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-03 16:20:59 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-03 16:20:59 +0800 |
commit | 9085b10508f1a3a5830549037f033ca58d184a0e (patch) | |
tree | f5eacaf62c8196f0f5e615666cfcc20941cd06b1 /core | |
parent | 5b14fdb94b61af9f17f53593766a706c9780a7be (diff) | |
parent | 0fa9d2431f54d603ef12c63a322d53d1c214d0a0 (diff) | |
download | dexon-9085b10508f1a3a5830549037f033ca58d184a0e.tar dexon-9085b10508f1a3a5830549037f033ca58d184a0e.tar.gz dexon-9085b10508f1a3a5830549037f033ca58d184a0e.tar.bz2 dexon-9085b10508f1a3a5830549037f033ca58d184a0e.tar.lz dexon-9085b10508f1a3a5830549037f033ca58d184a0e.tar.xz dexon-9085b10508f1a3a5830549037f033ca58d184a0e.tar.zst dexon-9085b10508f1a3a5830549037f033ca58d184a0e.zip |
Merge pull request #1169 from Gustav-Simonsson/unsupport_bruncles
Unsupport bruncles
Diffstat (limited to 'core')
-rw-r--r-- | core/block_processor.go | 4 |
1 files 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 { |