aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-16 19:04:43 +0800
committerobscuren <geffobscura@gmail.com>2015-05-16 19:04:43 +0800
commitad99089567757c315bc2e477c6f889b9c2c8789f (patch)
tree49393c19fdc31bbb1b45b32e430b9f4361cf8c09 /core
parent61e8296bd82b4392e55e6707f37b7d1d1e897dd7 (diff)
parentad7b0efbd3fc00e089159768b7475e657adf84fe (diff)
downloaddexon-ad99089567757c315bc2e477c6f889b9c2c8789f.tar
dexon-ad99089567757c315bc2e477c6f889b9c2c8789f.tar.gz
dexon-ad99089567757c315bc2e477c6f889b9c2c8789f.tar.bz2
dexon-ad99089567757c315bc2e477c6f889b9c2c8789f.tar.lz
dexon-ad99089567757c315bc2e477c6f889b9c2c8789f.tar.xz
dexon-ad99089567757c315bc2e477c6f889b9c2c8789f.tar.zst
dexon-ad99089567757c315bc2e477c6f889b9c2c8789f.zip
Merge branch 'hotfix/0.9.21.1' into develop
Diffstat (limited to 'core')
-rw-r--r--core/block_processor.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/block_processor.go b/core/block_processor.go
index 9a213686f..cae618b39 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -343,23 +343,23 @@ func (sm *BlockProcessor) VerifyUncles(statedb *state.StateDB, block, parent *ty
uncles.Add(block.Hash())
for i, uncle := range block.Uncles() {
- if uncles.Has(uncle.Hash()) {
+ hash := uncle.Hash()
+ if uncles.Has(hash) {
// Error not unique
- return UncleError("uncle[%d] not unique", i)
+ return UncleError("uncle[%d](%x) not unique", i, hash[:4])
}
+ uncles.Add(hash)
- uncles.Add(uncle.Hash())
-
- if ancestors.Has(uncle.Hash()) {
- return UncleError("uncle[%d] is ancestor", i)
+ if ancestors.Has(hash) {
+ return UncleError("uncle[%d](%x) is ancestor", i, hash[:4])
}
if !ancestors.Has(uncle.ParentHash) {
- return UncleError("uncle[%d]'s parent unknown (%x)", i, uncle.ParentHash[0:4])
+ return UncleError("uncle[%d](%x)'s parent unknown (%x)", i, hash[:4], uncle.ParentHash[0:4])
}
if err := sm.ValidateHeader(uncle, ancestorHeaders[uncle.ParentHash]); err != nil {
- return ValidationError(fmt.Sprintf("uncle[%d](%x) header invalid: %v", i, uncle.Hash().Bytes()[:4], err))
+ return ValidationError(fmt.Sprintf("uncle[%d](%x) header invalid: %v", i, hash[:4], err))
}
}