perf(engine): avoid unnecessary B256 copy in get_proof_targets

Use reference iteration instead of destructuring pattern to avoid
copying B256 on each iteration. The copy only happens when actually
needed for insertion.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matthias Seitz
2026-01-08 17:25:36 +01:00
parent 8eecad3d1d
commit f794c1d31d

View File

@@ -1284,9 +1284,9 @@ fn get_proof_targets(
let mut targets = MultiProofTargets::default();
// first collect all new accounts (not previously fetched)
for &hashed_address in state_update.accounts.keys() {
if !fetched_proof_targets.contains_key(&hashed_address) {
targets.insert(hashed_address, HashSet::default());
for hashed_address in state_update.accounts.keys() {
if !fetched_proof_targets.contains_key(hashed_address) {
targets.insert(*hashed_address, HashSet::default());
}
}