From 9ca5adc4c9095bd46d1a189d01a6a6166324eda6 Mon Sep 17 00:00:00 2001 From: sunny2022da <124866865+sunny2022da@users.noreply.github.com> Date: Tue, 12 Nov 2024 09:12:36 +0800 Subject: [PATCH] PEVM-fix: Disable prefetch when PEVM enabled (#218) --- core/blockchain.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index d40a7b601..2f25bbc2d 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -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 @@ -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)