good morning!!!!

Skip to content
Snippets Groups Projects
Commit 29611284 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Moved block validation as first step

parent 008e91db
No related branches found
No related tags found
No related merge requests found
...@@ -224,8 +224,9 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I ...@@ -224,8 +224,9 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
// before that. // before that.
defer state.Reset() defer state.Reset()
if ethutil.Config.Diff && ethutil.Config.DiffType == "all" { // Block validation
fmt.Printf("## %x %x ##\n", block.Hash(), block.Number) if err = sm.ValidateBlock(block, parent); err != nil {
return
} }
_, err = sm.TransitionState(state, parent, block) _, err = sm.TransitionState(state, parent, block)
...@@ -247,11 +248,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I ...@@ -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 { if err = sm.AccumelateRewards(state, block, parent); err != nil {
return return
} }
......
...@@ -24,7 +24,7 @@ const ( ...@@ -24,7 +24,7 @@ const (
// The size of the output buffer for writing messages // The size of the output buffer for writing messages
outputBufferSize = 50 outputBufferSize = 50
// Current protocol version // Current protocol version
ProtocolVersion = 46 ProtocolVersion = 47
// Current P2P version // Current P2P version
P2PVersion = 2 P2PVersion = 2
// Ethereum network version // Ethereum network version
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment