aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-06-03 16:20:59 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-06-03 16:20:59 +0800
commit9085b10508f1a3a5830549037f033ca58d184a0e (patch)
treef5eacaf62c8196f0f5e615666cfcc20941cd06b1 /core
parent5b14fdb94b61af9f17f53593766a706c9780a7be (diff)
parent0fa9d2431f54d603ef12c63a322d53d1c214d0a0 (diff)
downloaddexon-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.go4
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 {