Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/anvil/src/eth/pool/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,13 @@ impl ReadyTransactions {
self.provided_markers.remove(mark);
}

// remove from unlocks
// remove from unlocks (use distinct names to avoid shadowing outer `hash`)
for mark in &tx.transaction.transaction.requires {
if let Some(hash) = self.provided_markers.get(mark)
&& let Some(tx) = ready.get_mut(hash)
&& let Some(idx) = tx.unlocks.iter().position(|i| i == hash)
if let Some(provider_hash) = self.provided_markers.get(mark)
&& let Some(provider_tx) = ready.get_mut(provider_hash)
&& let Some(idx) = provider_tx.unlocks.iter().position(|i| i == &hash)
{
tx.unlocks.swap_remove(idx);
provider_tx.unlocks.swap_remove(idx);
}
}

Expand Down
Loading