mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
chore(provider): pre alloc tx hashes (#21114)
This commit is contained in:
@@ -493,7 +493,9 @@ impl<TX: DbTx + DbTxMut + 'static, N: NodeTypesForProvider> DatabaseProvider<TX,
|
||||
self.prune_modes.transaction_lookup.is_none_or(|m| !m.is_full())
|
||||
{
|
||||
let start = Instant::now();
|
||||
let mut all_tx_hashes = Vec::new();
|
||||
let total_tx_count: usize =
|
||||
blocks.iter().map(|b| b.recovered_block().body().transaction_count()).sum();
|
||||
let mut all_tx_hashes = Vec::with_capacity(total_tx_count);
|
||||
for (i, block) in blocks.iter().enumerate() {
|
||||
let recovered_block = block.recovered_block();
|
||||
let mut tx_num = tx_nums[i];
|
||||
|
||||
Reference in New Issue
Block a user