Skip to content

Commit 28769aa

Browse files
authored
fix(anvil): variable shadowing bug in ReadyTransactions::remove_with_markers (foundry-rs#13436)
Update transactions.rs
1 parent 81678d6 commit 28769aa

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

crates/anvil/src/eth/pool/transactions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,11 +653,11 @@ impl ReadyTransactions {
653653

654654
// remove from unlocks
655655
for mark in &tx.transaction.transaction.requires {
656-
if let Some(hash) = self.provided_markers.get(mark)
657-
&& let Some(tx) = ready.get_mut(hash)
658-
&& let Some(idx) = tx.unlocks.iter().position(|i| i == hash)
656+
if let Some(provider_hash) = self.provided_markers.get(mark)
657+
&& let Some(provider_tx) = ready.get_mut(provider_hash)
658+
&& let Some(idx) = provider_tx.unlocks.iter().position(|i| i == &hash)
659659
{
660-
tx.unlocks.swap_remove(idx);
660+
provider_tx.unlocks.swap_remove(idx);
661661
}
662662
}
663663

0 commit comments

Comments
 (0)