Skip to content

Commit 0b2fe3b

Browse files
committed
feat: enable prefetching in BuildAndWriteBlock
1 parent 0649954 commit 0b2fe3b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/blockchain.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,6 +1814,9 @@ func (bc *BlockChain) BuildAndWriteBlock(parentBlock *types.Block, header *types
18141814
return NonStatTy, err
18151815
}
18161816

1817+
statedb.StartPrefetcher("l1sync")
1818+
defer statedb.StopPrefetcher()
1819+
18171820
header.ParentHash = parentBlock.Hash()
18181821

18191822
tempBlock := types.NewBlockWithHeader(header).WithBody(txs, nil)

0 commit comments

Comments
 (0)