diff --git a/core/state_prefetcher.go b/core/state_prefetcher.go index 4f71e33cb1..68fb444188 100644 --- a/core/state_prefetcher.go +++ b/core/state_prefetcher.go @@ -66,7 +66,7 @@ func (p *statePrefetcher) Prefetch(transactions types.Transactions, header *type // Iterate over and process the individual transactions for i, tx := range transactions { - stateCpy := statedb.CopyDoPrefetch() // closure + stateCpy := statedb.CopyDoPrefetch() workers.Go(func() error { // If block precaching was interrupted, abort if interrupt != nil && interrupt.Load() { diff --git a/miner/bid_simulator.go b/miner/bid_simulator.go index b81ab2614e..9bcb6a1da3 100644 --- a/miner/bid_simulator.go +++ b/miner/bid_simulator.go @@ -771,8 +771,7 @@ func (b *bidSimulator) simBid(interruptCh chan int32, bidRuntime *BidRuntime) { if len(bidRuntime.bid.Txs) > prefetchTxNumber { var interrupt atomic.Bool defer interrupt.Store(true) // terminate the prefetch at the end - // TODO(Nathan): use ReadersWithCacheStats to accelerate - throwaway := bidRuntime.env.state.CopyDoPrefetch() + throwaway := bidRuntime.env.state.StateForPrefetch() // Disable tracing for prefetcher executions. vmCfg := *b.chain.GetVMConfig() vmCfg.Tracer = nil