Skip to content

Commit

Permalink
put error check to the correct location (bnb-chain#842)
Browse files Browse the repository at this point in the history
Co-authored-by: forcodedancing <liguo.fudan@gmail.com>
  • Loading branch information
forcodedancing and forcodedancing committed Apr 6, 2022
1 parent 12c5eb0 commit 343b315
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ func (p *LightStateProcessor) Process(block *types.Block, statedb *state.StateDB
statedb.StopPrefetcher()
parent := p.bc.GetHeader(block.ParentHash(), block.NumberU64()-1)
statedb, err = state.New(parent.Root, p.bc.stateCache, p.bc.snaps)
if err != nil {
return statedb, nil, nil, 0, err
}
statedb.SetExpectedStateRoot(block.Root())
if p.bc.pipeCommit {
statedb.EnablePipeCommit()
}
if err != nil {
return statedb, nil, nil, 0, err
}
// Enable prefetching to pull in trie node paths while processing transactions
statedb.StartPrefetcher("chain")
}
Expand Down

0 comments on commit 343b315

Please sign in to comment.