Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEVM-fix: Disable prefetch when PEVM enabled #218

Open
wants to merge 1 commit into
base: feature/TxDAG-PEVM
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading