Skip to content

Commit

Permalink
PEVM-fix: Disable prefetch when PEVM enabled
Browse files Browse the repository at this point in the history
There is no necessary to do prefetch for PEVM.
  • Loading branch information
sunny2022da committed Nov 8, 2024
1 parent e23be46 commit 08d8a21
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,10 @@ type BlockChain struct {
forker *ForkChoice
vmConfig vm.Config

parallelExecution bool
enableTxDAG bool
txDAGWriteCh chan TxDAGOutputItem
txDAGReader *TxDAGFileReader
serialProcessor Processor
enableTxDAG bool
txDAGWriteCh chan TxDAGOutputItem
txDAGReader *TxDAGFileReader
serialProcessor Processor
}

// NewBlockChain returns a fully initialised block chain using information
Expand Down Expand Up @@ -1920,7 +1919,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
// If we have a followup block, run that against the current state to pre-cache
// transactions and probabilistically some of the account/storage trie nodes.
// parallel mode has a pipeline, similar to this prefetch, to save CPU we disable this prefetch for parallel
if !bc.cacheConfig.TrieCleanNoPrefetch && !bc.parallelExecution {
if !bc.cacheConfig.TrieCleanNoPrefetch && !bc.vmConfig.EnableParallelExec {
if followup, err := it.peek(); followup != nil && err == nil {
throwaway, _ := state.New(parent.Root, bc.stateCache, bc.snaps)

Expand Down

0 comments on commit 08d8a21

Please sign in to comment.