diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-16 06:27:13 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-16 06:27:13 +0800 |
commit | 1564f1a020b9edc78bc672f8f2df64b3d0dc55c3 (patch) | |
tree | d898e2b20a6c2e0b5613ae7f669499c5db23b719 /core/block_processor.go | |
parent | 8e24378cc1acb074b56de75bf0baf6feb7927677 (diff) | |
parent | 7ea76fcf993f3fecb55233bdcc2409618d9080b9 (diff) | |
download | go-tangerine-1564f1a020b9edc78bc672f8f2df64b3d0dc55c3.tar go-tangerine-1564f1a020b9edc78bc672f8f2df64b3d0dc55c3.tar.gz go-tangerine-1564f1a020b9edc78bc672f8f2df64b3d0dc55c3.tar.bz2 go-tangerine-1564f1a020b9edc78bc672f8f2df64b3d0dc55c3.tar.lz go-tangerine-1564f1a020b9edc78bc672f8f2df64b3d0dc55c3.tar.xz go-tangerine-1564f1a020b9edc78bc672f8f2df64b3d0dc55c3.tar.zst go-tangerine-1564f1a020b9edc78bc672f8f2df64b3d0dc55c3.zip |
Merge branch 'release/0.9.21'v0.9.21
Diffstat (limited to 'core/block_processor.go')
-rw-r--r-- | core/block_processor.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index af47069ad..9a213686f 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -24,8 +24,6 @@ const ( BlockChainVersion = 2 ) -var statelogger = logger.NewLogger("BLOCK") - type BlockProcessor struct { db common.Database extraDb common.Database @@ -197,7 +195,7 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (logs st // There can be at most two uncles if len(block.Uncles()) > 2 { - return nil, ValidationError("Block can only contain one uncle (contained %v)", len(block.Uncles())) + return nil, ValidationError("Block can only contain maximum 2 uncles (contained %v)", len(block.Uncles())) } receipts, err := sm.TransitionState(state, parent, block, false) @@ -347,17 +345,17 @@ func (sm *BlockProcessor) VerifyUncles(statedb *state.StateDB, block, parent *ty for i, uncle := range block.Uncles() { if uncles.Has(uncle.Hash()) { // Error not unique - return UncleError("Uncle not unique") + return UncleError("uncle[%d] not unique", i) } uncles.Add(uncle.Hash()) if ancestors.Has(uncle.Hash()) { - return UncleError("Uncle is ancestor") + return UncleError("uncle[%d] is ancestor", i) } if !ancestors.Has(uncle.ParentHash) { - return UncleError(fmt.Sprintf("Uncle's parent unknown (%x)", uncle.ParentHash[0:4])) + return UncleError("uncle[%d]'s parent unknown (%x)", i, uncle.ParentHash[0:4]) } if err := sm.ValidateHeader(uncle, ancestorHeaders[uncle.ParentHash]); err != nil { |