forked from cerc-io/plugeth
Moved block validation as first step
This commit is contained in:
parent
008e91db6a
commit
296112848c
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user