Revert "chore(txpool): use stabilized pop_last (#213)" (#221)

This reverts commit bdf41d39a8.
This commit is contained in:
Matthias Seitz
2022-11-16 19:41:24 +01:00
committed by GitHub
parent 11404adf6c
commit bb83d8a528

View File

@ -49,7 +49,8 @@ impl<T: TransactionOrdering> Iterator for BestTransactions<T> {
fn next(&mut self) -> Option<Self::Item> { fn next(&mut self) -> Option<Self::Item> {
loop { loop {
// Remove the next independent tx with the highest priority // Remove the next independent tx with the highest priority
let best = self.independent.pop_last()?; let best = self.independent.iter().next_back()?.clone();
let best = self.independent.take(&best)?;
let hash = best.transaction.hash(); let hash = best.transaction.hash();
// skip transactions that were marked as invalid // skip transactions that were marked as invalid