From 296112848cfe1a9697bbb92a9deb3eb1e04d6276 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 4 Dec 2014 15:13:29 +0100 Subject: Moved block validation as first step --- core/block_manager.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'core') diff --git a/core/block_manager.go b/core/block_manager.go index da8a3fa15..c2ffc7ae0 100644 --- a/core/block_manager.go +++ b/core/block_manager.go @@ -224,8 +224,9 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I // before that. defer state.Reset() - if ethutil.Config.Diff && ethutil.Config.DiffType == "all" { - fmt.Printf("## %x %x ##\n", block.Hash(), block.Number) + // Block validation + if err = sm.ValidateBlock(block, parent); err != nil { + return } _, err = sm.TransitionState(state, parent, block) @@ -247,11 +248,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I } */ - // Block validation - if err = sm.ValidateBlock(block, parent); err != nil { - return - } - if err = sm.AccumelateRewards(state, block, parent); err != nil { return } -- cgit