Skip to content

Commit bb83d8a

Browse files
authored
Revert "chore(txpool): use stabilized pop_last (#213)" (#221)
This reverts commit bdf41d3.
1 parent 11404ad commit bb83d8a

File tree

1 file changed

+2
-1
lines changed
  • crates/transaction-pool/src/pool

1 file changed

+2
-1
lines changed

crates/transaction-pool/src/pool/best.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ impl<T: TransactionOrdering> Iterator for BestTransactions<T> {
4949
fn next(&mut self) -> Option<Self::Item> {
5050
loop {
5151
// Remove the next independent tx with the highest priority
52-
let best = self.independent.pop_last()?;
52+
let best = self.independent.iter().next_back()?.clone();
53+
let best = self.independent.take(&best)?;
5354
let hash = best.transaction.hash();
5455

5556
// skip transactions that were marked as invalid

0 commit comments

Comments
 (0)