mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
perf(blockchain-tree:) use Vec::reserve_exact (#11839)
This commit is contained in:
@@ -902,6 +902,7 @@ where
|
||||
// check unconnected block buffer for children of the chains
|
||||
let mut all_chain_blocks = Vec::new();
|
||||
for chain in self.state.chains.values() {
|
||||
all_chain_blocks.reserve_exact(chain.blocks().len());
|
||||
for (&number, block) in chain.blocks() {
|
||||
all_chain_blocks.push(BlockNumHash { number, hash: block.hash() })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user