mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(txpool): use stabilized pop_last (#213)
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user