mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
perf(trie): dispatch storage proofs in lexicographical order (#21213)
Signed-off-by: Ahsen Kamal <itsahsenkamal@gmail.com>
This commit is contained in:
@@ -1555,8 +1555,11 @@ fn dispatch_storage_proofs(
|
||||
let mut storage_proof_receivers =
|
||||
B256Map::with_capacity_and_hasher(targets.len(), Default::default());
|
||||
|
||||
let mut sorted_targets: Vec<_> = targets.iter().collect();
|
||||
sorted_targets.sort_unstable_by_key(|(addr, _)| *addr);
|
||||
|
||||
// Dispatch all storage proofs to worker pool
|
||||
for (hashed_address, target_slots) in targets.iter() {
|
||||
for (hashed_address, target_slots) in sorted_targets {
|
||||
// Create channel for receiving ProofResultMessage
|
||||
let (result_tx, result_rx) = crossbeam_channel::unbounded();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user