diff --git a/crates/transaction-pool/src/pool/best.rs b/crates/transaction-pool/src/pool/best.rs index 52c0e26f97..e6dabc7328 100644 --- a/crates/transaction-pool/src/pool/best.rs +++ b/crates/transaction-pool/src/pool/best.rs @@ -49,8 +49,7 @@ impl Iterator for BestTransactions { fn next(&mut self) -> Option { loop { // Remove the next independent tx with the highest priority - let best = self.independent.iter().next_back()?.clone(); - let best = self.independent.take(&best)?; + let best = self.independent.pop_last()?; let hash = best.transaction.hash(); // skip transactions that were marked as invalid