@@ -1654,18 +1654,17 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, er
1654
1654
// If we have a followup block, run that against the current state to pre-cache
1655
1655
// transactions and probabilistically some of the account/storage trie nodes.
1656
1656
var followupInterrupt uint32
1657
-
1658
1657
if ! bc .cacheConfig .TrieCleanNoPrefetch {
1659
1658
if followup , err := it .peek (); followup != nil && err == nil {
1660
- go func ( start time. Time ) {
1661
- throwaway , _ := state .New ( parent . Root , bc . stateCache )
1662
- bc .prefetcher .Prefetch (followup , throwaway , bc .vmConfig , & followupInterrupt )
1659
+ throwaway , _ := state . New ( parent . Root , bc . stateCache )
1660
+ go func ( start time. Time , followup * types. Block , throwaway * state.StateDB , interrupt * uint32 ) {
1661
+ bc .prefetcher .Prefetch (followup , throwaway , bc .vmConfig , interrupt )
1663
1662
1664
1663
blockPrefetchExecuteTimer .Update (time .Since (start ))
1665
- if atomic .LoadUint32 (& followupInterrupt ) == 1 {
1664
+ if atomic .LoadUint32 (interrupt ) == 1 {
1666
1665
blockPrefetchInterruptMeter .Mark (1 )
1667
1666
}
1668
- }(time .Now ())
1667
+ }(time .Now (), followup , throwaway , & followupInterrupt )
1669
1668
}
1670
1669
}
1671
1670
// Process block using the parent state as reference point
0 commit comments