Skip to content

Commit

Permalink
fix: update highest nonce if highest nonce (#6618)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Feb 15, 2024
1 parent 81eb3e1 commit c3afaa1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/transaction-pool/src/pool/pending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,10 @@ impl<T: TransactionOrdering> PendingPool<T> {
self.independent_transactions.remove(&tx);

// switch out for the next ancestor if there is one
self.highest_nonces.remove(&tx);
if let Some(ancestor) = self.ancestor(id) {
self.highest_nonces.insert(ancestor.clone());
if self.highest_nonces.remove(&tx) {
if let Some(ancestor) = self.ancestor(id) {
self.highest_nonces.insert(ancestor.clone());
}
}
Some(tx.transaction)
}
Expand Down

0 comments on commit c3afaa1

Please sign in to comment.