mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
tx-pool: add all method for AllPoolTransactions (#12643)
This commit is contained in:
@@ -551,6 +551,11 @@ impl<T: PoolTransaction> AllPoolTransactions<T> {
|
||||
pub fn queued_recovered(&self) -> impl Iterator<Item = T::Consensus> + '_ {
|
||||
self.queued.iter().map(|tx| tx.transaction.clone().into())
|
||||
}
|
||||
|
||||
/// Returns an iterator over all transactions, both pending and queued.
|
||||
pub fn all(&self) -> impl Iterator<Item = T::Consensus> + '_ {
|
||||
self.pending.iter().chain(self.queued.iter()).map(|tx| tx.transaction.clone().into())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: PoolTransaction> Default for AllPoolTransactions<T> {
|
||||
|
||||
Reference in New Issue
Block a user