Trait reth::transaction_pool::TransactionPool

source ·
pub trait TransactionPool: Send + Sync + Clone {
    type Transaction: PoolTransaction;

Show 45 methods // Required methods fn pool_size(&self) -> PoolSize; fn block_info(&self) -> BlockInfo; fn add_transaction_and_subscribe( &self, origin: TransactionOrigin, transaction: Self::Transaction, ) -> impl Future<Output = Result<TransactionEvents, PoolError>> + Send; fn add_transaction( &self, origin: TransactionOrigin, transaction: Self::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send; fn add_transactions( &self, origin: TransactionOrigin, transactions: Vec<Self::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send; fn transaction_event_listener( &self, tx_hash: FixedBytes<32>, ) -> Option<TransactionEvents>; fn all_transactions_event_listener( &self, ) -> AllTransactionsEvents<Self::Transaction>; fn pending_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<FixedBytes<32>>; fn blob_transaction_sidecars_listener(&self) -> Receiver<NewBlobSidecar>; fn new_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<NewTransactionEvent<Self::Transaction>>; fn pooled_transaction_hashes(&self) -> Vec<FixedBytes<32>>; fn pooled_transaction_hashes_max(&self, max: usize) -> Vec<FixedBytes<32>>; fn pooled_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>; fn pooled_transactions_max( &self, max: usize, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>; fn get_pooled_transaction_elements( &self, tx_hashes: Vec<FixedBytes<32>>, limit: GetPooledTransactionLimit, ) -> Vec<PooledTransactionsElement>; fn get_pooled_transaction_element( &self, tx_hash: FixedBytes<32>, ) -> Option<PooledTransactionsElement>; fn best_transactions( &self, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<Self::Transaction>>>>; fn best_transactions_with_base_fee( &self, base_fee: u64, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<Self::Transaction>>>>; fn best_transactions_with_attributes( &self, best_transactions_attributes: BestTransactionsAttributes, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<Self::Transaction>>>>; fn pending_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>; fn queued_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>; fn all_transactions(&self) -> AllPoolTransactions<Self::Transaction>; fn remove_transactions( &self, hashes: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>; fn retain_unknown<A>(&self, announcement: &mut A) where A: HandleMempoolData; fn get( &self, tx_hash: &FixedBytes<32>, ) -> Option<Arc<ValidPoolTransaction<Self::Transaction>>>; fn get_all( &self, txs: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>; fn on_propagated(&self, txs: PropagatedTransactions); fn get_transactions_by_sender( &self, sender: Address, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>; fn get_transactions_by_sender_and_nonce( &self, sender: Address, nonce: u64, ) -> Option<Arc<ValidPoolTransaction<Self::Transaction>>>; fn get_transactions_by_origin( &self, origin: TransactionOrigin, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>; fn unique_senders(&self) -> HashSet<Address>; fn get_blob( &self, tx_hash: FixedBytes<32>, ) -> Result<Option<BlobTransactionSidecar>, BlobStoreError>; fn get_all_blobs( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<(FixedBytes<32>, BlobTransactionSidecar)>, BlobStoreError>; fn get_all_blobs_exact( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<BlobTransactionSidecar>, BlobStoreError>; // Provided methods fn add_external_transaction( &self, transaction: Self::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send { ... } fn add_external_transactions( &self, transactions: Vec<Self::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send { ... } fn pending_transactions_listener(&self) -> Receiver<FixedBytes<32>> { ... } fn new_transactions_listener( &self, ) -> Receiver<NewTransactionEvent<Self::Transaction>> { ... } fn new_pending_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<Self::Transaction> { ... } fn new_basefee_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<Self::Transaction> { ... } fn new_queued_transactions_listener( &self, ) -> NewSubpoolTransactionStream<Self::Transaction> { ... } fn contains(&self, tx_hash: &FixedBytes<32>) -> bool { ... } fn get_local_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>> { ... } fn get_private_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>> { ... } fn get_external_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>> { ... }
}
Expand description

General purpose abstraction of a transaction-pool.

This is intended to be used by API-consumers such as RPC that need inject new incoming, unverified transactions. And by block production that needs to get transactions to execute in a new block.

Note: This requires Clone for convenience, since it is assumed that this will be implemented for a wrapped Arc type, see also Pool.

Required Associated Types§

source

type Transaction: PoolTransaction

The transaction type of the pool

Required Methods§

source

fn pool_size(&self) -> PoolSize

Returns stats about the pool and all sub-pools.

source

fn block_info(&self) -> BlockInfo

Returns the block the pool is currently tracking.

This tracks the block that the pool has last seen.

source

fn add_transaction_and_subscribe( &self, origin: TransactionOrigin, transaction: Self::Transaction, ) -> impl Future<Output = Result<TransactionEvents, PoolError>> + Send

Adds an unvalidated transaction into the pool and subscribe to state changes.

This is the same as TransactionPool::add_transaction but returns an event stream for the given transaction.

Consumer: Custom

source

fn add_transaction( &self, origin: TransactionOrigin, transaction: Self::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send

Adds an unvalidated transaction into the pool.

Consumer: RPC

source

fn add_transactions( &self, origin: TransactionOrigin, transactions: Vec<Self::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send

Adds the given unvalidated transaction into the pool.

Returns a list of results.

Consumer: RPC

source

fn transaction_event_listener( &self, tx_hash: FixedBytes<32>, ) -> Option<TransactionEvents>

Returns a new transaction change event stream for the given transaction.

Returns None if the transaction is not in the pool.

source

fn all_transactions_event_listener( &self, ) -> AllTransactionsEvents<Self::Transaction>

Returns a new transaction change event stream for all transactions in the pool.

source

fn pending_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<FixedBytes<32>>

Returns a new [Receiver] that yields transactions hashes for new pending transactions inserted into the pending pool depending on the given TransactionListenerKind argument.

source

fn blob_transaction_sidecars_listener(&self) -> Receiver<NewBlobSidecar>

Returns a new [Receiver] that yields blob “sidecars” (blobs w/ assoc. kzg commitments/proofs) for eip-4844 transactions inserted into the pool

source

fn new_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<NewTransactionEvent<Self::Transaction>>

Returns a new stream that yields new valid transactions added to the pool depending on the given TransactionListenerKind argument.

source

fn pooled_transaction_hashes(&self) -> Vec<FixedBytes<32>>

Returns the hashes of all transactions in the pool.

Note: This returns a Vec but should guarantee that all hashes are unique.

Consumer: P2P

source

fn pooled_transaction_hashes_max(&self, max: usize) -> Vec<FixedBytes<32>>

Returns only the first max hashes of transactions in the pool.

Consumer: P2P

source

fn pooled_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns the full transaction objects all transactions in the pool.

This is intended to be used by the network for the initial exchange of pooled transaction hashes

Note: This returns a Vec but should guarantee that all transactions are unique.

Caution: In case of blob transactions, this does not include the sidecar.

Consumer: P2P

source

fn pooled_transactions_max( &self, max: usize, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns only the first max transactions in the pool.

Consumer: P2P

source

fn get_pooled_transaction_elements( &self, tx_hashes: Vec<FixedBytes<32>>, limit: GetPooledTransactionLimit, ) -> Vec<PooledTransactionsElement>

Returns converted PooledTransactionsElement for the given transaction hashes.

This adheres to the expected behavior of GetPooledTransactions:

The transactions must be in same order as in the request, but it is OK to skip transactions which are not available.

If the transaction is a blob transaction, the sidecar will be included.

Consumer: P2P

source

fn get_pooled_transaction_element( &self, tx_hash: FixedBytes<32>, ) -> Option<PooledTransactionsElement>

Returns converted PooledTransactionsElement for the given transaction hash.

This adheres to the expected behavior of GetPooledTransactions:

If the transaction is a blob transaction, the sidecar will be included.

Consumer: P2P

source

fn best_transactions( &self, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<Self::Transaction>>>>

Returns an iterator that yields transactions that are ready for block production.

Consumer: Block production

source

fn best_transactions_with_base_fee( &self, base_fee: u64, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<Self::Transaction>>>>

👎Deprecated: Use best_transactions_with_attributes instead.

Returns an iterator that yields transactions that are ready for block production with the given base fee.

Consumer: Block production

source

fn best_transactions_with_attributes( &self, best_transactions_attributes: BestTransactionsAttributes, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<Self::Transaction>>>>

Returns an iterator that yields transactions that are ready for block production with the given base fee and optional blob fee attributes.

Consumer: Block production

source

fn pending_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns all transactions that can be included in the next block.

This is primarily used for the txpool_ RPC namespace: https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool which distinguishes between pending and queued transactions, where pending are transactions ready for inclusion in the next block and queued are transactions that are ready for inclusion in future blocks.

Consumer: RPC

source

fn queued_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns all transactions that can be included in future blocks.

This and Self::pending_transactions are mutually exclusive.

Consumer: RPC

source

fn all_transactions(&self) -> AllPoolTransactions<Self::Transaction>

Returns all transactions that are currently in the pool grouped by whether they are ready for inclusion in the next block or not.

This is primarily used for the txpool_ namespace: https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool

Consumer: RPC

source

fn remove_transactions( &self, hashes: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Removes all transactions corresponding to the given hashes.

Also removes all dependent transactions.

Consumer: Utility

source

fn retain_unknown<A>(&self, announcement: &mut A)

Retains only those hashes that are unknown to the pool. In other words, removes all transactions from the given set that are currently present in the pool. Returns hashes already known to the pool.

Consumer: P2P

source

fn get( &self, tx_hash: &FixedBytes<32>, ) -> Option<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns the transaction for the given hash.

source

fn get_all( &self, txs: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns all transactions objects for the given hashes.

Caution: This in case of blob transactions, this does not include the sidecar.

source

fn on_propagated(&self, txs: PropagatedTransactions)

Notify the pool about transactions that are propagated to peers.

Consumer: P2P

source

fn get_transactions_by_sender( &self, sender: Address, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns all transactions sent by a given user

source

fn get_transactions_by_sender_and_nonce( &self, sender: Address, nonce: u64, ) -> Option<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns a transaction sent by a given user with a given nonce

source

fn get_transactions_by_origin( &self, origin: TransactionOrigin, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns all transactions that where submitted with the given TransactionOrigin

source

fn unique_senders(&self) -> HashSet<Address>

Returns a set of all senders of transactions in the pool

source

fn get_blob( &self, tx_hash: FixedBytes<32>, ) -> Result<Option<BlobTransactionSidecar>, BlobStoreError>

Returns the BlobTransactionSidecar for the given transaction hash if it exists in the blob store.

source

fn get_all_blobs( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<(FixedBytes<32>, BlobTransactionSidecar)>, BlobStoreError>

Returns all BlobTransactionSidecar for the given transaction hashes if they exists in the blob store.

This only returns the blobs that were found in the store. If there’s no blob it will not be returned.

source

fn get_all_blobs_exact( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<BlobTransactionSidecar>, BlobStoreError>

Returns the exact BlobTransactionSidecar for the given transaction hashes in the order they were requested.

Returns an error if any of the blobs are not found in the blob store.

Provided Methods§

source

fn add_external_transaction( &self, transaction: Self::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send

Imports an external transaction.

This is intended to be used by the network to insert incoming transactions received over the p2p network.

Consumer: P2P

source

fn add_external_transactions( &self, transactions: Vec<Self::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send

Imports all external transactions

Consumer: Utility

source

fn pending_transactions_listener(&self) -> Receiver<FixedBytes<32>>

Returns a new Stream that yields transactions hashes for new pending transactions inserted into the pool that are allowed to be propagated.

Note: This is intended for networking and will only yield transactions that are allowed to be propagated over the network, see also TransactionListenerKind.

Consumer: RPC/P2P

source

fn new_transactions_listener( &self, ) -> Receiver<NewTransactionEvent<Self::Transaction>>

Returns a new stream that yields new valid transactions added to the pool.

source

fn new_pending_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<Self::Transaction>

Returns a new Stream that yields new transactions added to the pending sub-pool.

This is a convenience wrapper around Self::new_transactions_listener that filters for SubPool::Pending.

source

fn new_basefee_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<Self::Transaction>

Returns a new Stream that yields new transactions added to the basefee sub-pool.

This is a convenience wrapper around Self::new_transactions_listener that filters for SubPool::BaseFee.

source

fn new_queued_transactions_listener( &self, ) -> NewSubpoolTransactionStream<Self::Transaction>

Returns a new Stream that yields new transactions added to the queued-pool.

This is a convenience wrapper around Self::new_transactions_listener that filters for SubPool::Queued.

source

fn contains(&self, tx_hash: &FixedBytes<32>) -> bool

Returns if the transaction for the given hash is already included in this pool.

source

fn get_local_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns all transactions that where submitted as TransactionOrigin::Local

source

fn get_private_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns all transactions that where submitted as TransactionOrigin::Private

source

fn get_external_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<Self::Transaction>>>

Returns all transactions that where submitted as TransactionOrigin::External

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T> TransactionPool for &'a T
where T: 'a + TransactionPool + ?Sized, &'a T: Send + Sync + Clone,

§

type Transaction = <T as TransactionPool>::Transaction

source§

fn pool_size(&self) -> PoolSize

source§

fn block_info(&self) -> BlockInfo

source§

fn add_external_transaction( &self, transaction: <&'a T as TransactionPool>::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send

source§

fn add_external_transactions( &self, transactions: Vec<<&'a T as TransactionPool>::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send

source§

fn add_transaction_and_subscribe( &self, origin: TransactionOrigin, transaction: <&'a T as TransactionPool>::Transaction, ) -> impl Future<Output = Result<TransactionEvents, PoolError>> + Send

source§

fn add_transaction( &self, origin: TransactionOrigin, transaction: <&'a T as TransactionPool>::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send

source§

fn add_transactions( &self, origin: TransactionOrigin, transactions: Vec<<&'a T as TransactionPool>::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send

source§

fn transaction_event_listener( &self, tx_hash: FixedBytes<32>, ) -> Option<TransactionEvents>

source§

fn all_transactions_event_listener( &self, ) -> AllTransactionsEvents<<&'a T as TransactionPool>::Transaction>

source§

fn pending_transactions_listener(&self) -> Receiver<FixedBytes<32>>

source§

fn pending_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<FixedBytes<32>>

source§

fn new_transactions_listener( &self, ) -> Receiver<NewTransactionEvent<<&'a T as TransactionPool>::Transaction>>

source§

fn blob_transaction_sidecars_listener(&self) -> Receiver<NewBlobSidecar>

source§

fn new_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<NewTransactionEvent<<&'a T as TransactionPool>::Transaction>>

source§

fn new_pending_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<&'a T as TransactionPool>::Transaction>

source§

fn new_basefee_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<&'a T as TransactionPool>::Transaction>

source§

fn new_queued_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<&'a T as TransactionPool>::Transaction>

source§

fn pooled_transaction_hashes(&self) -> Vec<FixedBytes<32>>

source§

fn pooled_transaction_hashes_max(&self, max: usize) -> Vec<FixedBytes<32>>

source§

fn pooled_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn pooled_transactions_max( &self, max: usize, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn get_pooled_transaction_elements( &self, tx_hashes: Vec<FixedBytes<32>>, limit: GetPooledTransactionLimit, ) -> Vec<PooledTransactionsElement>

source§

fn get_pooled_transaction_element( &self, tx_hash: FixedBytes<32>, ) -> Option<PooledTransactionsElement>

source§

fn best_transactions( &self, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>>

source§

fn best_transactions_with_base_fee( &self, base_fee: u64, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>>

👎Deprecated: Use best_transactions_with_attributes instead.
source§

fn best_transactions_with_attributes( &self, best_transactions_attributes: BestTransactionsAttributes, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>>

source§

fn pending_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn queued_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn all_transactions( &self, ) -> AllPoolTransactions<<&'a T as TransactionPool>::Transaction>

source§

fn remove_transactions( &self, hashes: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn retain_unknown<A>(&self, announcement: &mut A)

source§

fn contains(&self, tx_hash: &FixedBytes<32>) -> bool

source§

fn get( &self, tx_hash: &FixedBytes<32>, ) -> Option<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn get_all( &self, txs: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn on_propagated(&self, txs: PropagatedTransactions)

source§

fn get_transactions_by_sender( &self, sender: Address, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn get_transactions_by_sender_and_nonce( &self, sender: Address, nonce: u64, ) -> Option<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn get_transactions_by_origin( &self, origin: TransactionOrigin, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn get_local_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn get_private_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn get_external_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<&'a T as TransactionPool>::Transaction>>>

source§

fn unique_senders(&self) -> HashSet<Address>

source§

fn get_blob( &self, tx_hash: FixedBytes<32>, ) -> Result<Option<BlobTransactionSidecar>, BlobStoreError>

source§

fn get_all_blobs( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<(FixedBytes<32>, BlobTransactionSidecar)>, BlobStoreError>

source§

fn get_all_blobs_exact( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<BlobTransactionSidecar>, BlobStoreError>

source§

impl<T> TransactionPool for Arc<T>
where T: TransactionPool + ?Sized, Arc<T>: Send + Sync + Clone,

§

type Transaction = <T as TransactionPool>::Transaction

source§

fn pool_size(&self) -> PoolSize

source§

fn block_info(&self) -> BlockInfo

source§

fn add_external_transaction( &self, transaction: <Arc<T> as TransactionPool>::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send

source§

fn add_external_transactions( &self, transactions: Vec<<Arc<T> as TransactionPool>::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send

source§

fn add_transaction_and_subscribe( &self, origin: TransactionOrigin, transaction: <Arc<T> as TransactionPool>::Transaction, ) -> impl Future<Output = Result<TransactionEvents, PoolError>> + Send

source§

fn add_transaction( &self, origin: TransactionOrigin, transaction: <Arc<T> as TransactionPool>::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send

source§

fn add_transactions( &self, origin: TransactionOrigin, transactions: Vec<<Arc<T> as TransactionPool>::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send

source§

fn transaction_event_listener( &self, tx_hash: FixedBytes<32>, ) -> Option<TransactionEvents>

source§

fn all_transactions_event_listener( &self, ) -> AllTransactionsEvents<<Arc<T> as TransactionPool>::Transaction>

source§

fn pending_transactions_listener(&self) -> Receiver<FixedBytes<32>>

source§

fn pending_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<FixedBytes<32>>

source§

fn new_transactions_listener( &self, ) -> Receiver<NewTransactionEvent<<Arc<T> as TransactionPool>::Transaction>>

source§

fn blob_transaction_sidecars_listener(&self) -> Receiver<NewBlobSidecar>

source§

fn new_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<NewTransactionEvent<<Arc<T> as TransactionPool>::Transaction>>

source§

fn new_pending_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>

source§

fn new_basefee_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>

source§

fn new_queued_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>

source§

fn pooled_transaction_hashes(&self) -> Vec<FixedBytes<32>>

source§

fn pooled_transaction_hashes_max(&self, max: usize) -> Vec<FixedBytes<32>>

source§

fn pooled_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn pooled_transactions_max( &self, max: usize, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn get_pooled_transaction_elements( &self, tx_hashes: Vec<FixedBytes<32>>, limit: GetPooledTransactionLimit, ) -> Vec<PooledTransactionsElement>

source§

fn get_pooled_transaction_element( &self, tx_hash: FixedBytes<32>, ) -> Option<PooledTransactionsElement>

source§

fn best_transactions( &self, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>>

source§

fn best_transactions_with_base_fee( &self, base_fee: u64, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>>

👎Deprecated: Use best_transactions_with_attributes instead.
source§

fn best_transactions_with_attributes( &self, best_transactions_attributes: BestTransactionsAttributes, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>>

source§

fn pending_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn queued_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn all_transactions( &self, ) -> AllPoolTransactions<<Arc<T> as TransactionPool>::Transaction>

source§

fn remove_transactions( &self, hashes: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn retain_unknown<A>(&self, announcement: &mut A)

source§

fn contains(&self, tx_hash: &FixedBytes<32>) -> bool

source§

fn get( &self, tx_hash: &FixedBytes<32>, ) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn get_all( &self, txs: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn on_propagated(&self, txs: PropagatedTransactions)

source§

fn get_transactions_by_sender( &self, sender: Address, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn get_transactions_by_sender_and_nonce( &self, sender: Address, nonce: u64, ) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn get_transactions_by_origin( &self, origin: TransactionOrigin, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn get_local_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn get_private_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn get_external_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>

source§

fn unique_senders(&self) -> HashSet<Address>

source§

fn get_blob( &self, tx_hash: FixedBytes<32>, ) -> Result<Option<BlobTransactionSidecar>, BlobStoreError>

source§

fn get_all_blobs( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<(FixedBytes<32>, BlobTransactionSidecar)>, BlobStoreError>

source§

fn get_all_blobs_exact( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<BlobTransactionSidecar>, BlobStoreError>

Implementors§

source§

impl TransactionPool for NoopTransactionPool

source§

impl<V, T, S> TransactionPool for Pool<V, T, S>

implements the TransactionPool interface for various transaction pool API consumers.