chore(txpool): use stabilized pop_last (#213)

This commit is contained in:
Matthias Seitz
2022-11-16 12:19:15 +01:00
committed by GitHub
parent 6b336c62fb
commit bdf41d39a8

View File

@ -49,8 +49,7 @@ impl<T: TransactionOrdering> Iterator for BestTransactions<T> {
fn next(&mut self) -> Option<Self::Item> {
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