fix: update highest nonce if highest nonce (#6618)

This commit is contained in:
Matthias Seitz
2024-02-15 17:31:19 +01:00
committed by GitHub
parent 81eb3e1b21
commit c3afaa1f13

View File

@ -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)
}