diff options
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 { |