Skip to content

Commit

Permalink
PEVM-fix: Disable prefetch when PEVM enabled (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny2022da authored Nov 12, 2024
1 parent e23be46 commit 9ca5adc
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 9ca5adc

Please sign in to comment.