Skip to content

Commit

Permalink
Improve StatePrefetch, use AsMessageNoNonceCheck to skip nonce check
Browse files Browse the repository at this point in the history
For state prefetch, no need to check transaction's nonce,
since the transaction's result will be discarded anyway.
  • Loading branch information
setunapo committed Jun 17, 2022
1 parent 8537153 commit 28f8090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/state_prefetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (p *statePrefetcher) Prefetch(block *types.Block, statedb *state.StateDB, c
return
}
// Convert the transaction into an executable message and pre-cache its sender
msg, err := tx.AsMessage(signer)
msg, err := tx.AsMessageNoNonceCheck(signer)
if err != nil {
return // Also invalid block, bail out
}
Expand Down

0 comments on commit 28f8090

Please sign in to comment.