mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
feat: enforce txpool propagation setting (#3677)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -232,13 +232,13 @@ where
|
||||
/// Returns hashes of _all_ transactions in the pool.
|
||||
pub(crate) fn pooled_transactions_hashes(&self) -> Vec<TxHash> {
|
||||
let pool = self.pool.read();
|
||||
pool.all().hashes_iter().collect()
|
||||
pool.all().transactions_iter().filter(|tx| tx.propagate).map(|tx| *tx.hash()).collect()
|
||||
}
|
||||
|
||||
/// Returns _all_ transactions in the pool.
|
||||
pub(crate) fn pooled_transactions(&self) -> Vec<Arc<ValidPoolTransaction<T::Transaction>>> {
|
||||
let pool = self.pool.read();
|
||||
pool.all().transactions_iter().collect()
|
||||
pool.all().transactions_iter().filter(|tx| tx.propagate).collect()
|
||||
}
|
||||
|
||||
/// Updates the entire pool after a new block was executed.
|
||||
|
||||
@@ -637,6 +637,7 @@ impl<T: PoolTransaction> AllTransactions<T> {
|
||||
}
|
||||
|
||||
/// Returns an iterator over all _unique_ hashes in the pool
|
||||
#[allow(unused)]
|
||||
pub(crate) fn hashes_iter(&self) -> impl Iterator<Item = TxHash> + '_ {
|
||||
self.by_hash.keys().copied()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user