mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
feat(txpool): add IntoIterator for AllPoolTransactions (#21241)
This commit is contained in:
@@ -746,6 +746,18 @@ impl<T: PoolTransaction> Default for AllPoolTransactions<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: PoolTransaction> IntoIterator for AllPoolTransactions<T> {
|
||||
type Item = Arc<ValidPoolTransaction<T>>;
|
||||
type IntoIter = std::iter::Chain<
|
||||
std::vec::IntoIter<Arc<ValidPoolTransaction<T>>>,
|
||||
std::vec::IntoIter<Arc<ValidPoolTransaction<T>>>,
|
||||
>;
|
||||
|
||||
fn into_iter(self) -> Self::IntoIter {
|
||||
self.pending.into_iter().chain(self.queued)
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents transactions that were propagated over the network.
|
||||
#[derive(Debug, Clone, Eq, PartialEq, Default)]
|
||||
pub struct PropagatedTransactions(pub HashMap<TxHash, Vec<PropagateKind>>);
|
||||
|
||||
Reference in New Issue
Block a user