Trait TransactionPoolExt
pub trait TransactionPoolExt: TransactionPool {
// Required methods
fn set_block_info(&self, info: BlockInfo);
fn on_canonical_state_change(&self, update: CanonicalStateUpdate<'_>);
fn update_accounts(&self, accounts: Vec<ChangedAccount>);
fn delete_blob(&self, tx: FixedBytes<32>);
fn delete_blobs(&self, txs: Vec<FixedBytes<32>>);
fn cleanup_blobs(&self);
}
Expand description
Extension for TransactionPool trait that allows to set the current block info.
Required Methods§
fn set_block_info(&self, info: BlockInfo)
fn set_block_info(&self, info: BlockInfo)
Sets the current block info for the pool.
fn on_canonical_state_change(&self, update: CanonicalStateUpdate<'_>)
fn on_canonical_state_change(&self, update: CanonicalStateUpdate<'_>)
Event listener for when the pool needs to be updated.
Implementers need to update the pool accordingly:
§Fee changes
The CanonicalStateUpdate
includes the base and blob fee of the pending block, which
affects the dynamic fee requirement of pending transactions in the pool.
§EIP-4844 Blob transactions
Mined blob transactions need to be removed from the pool, but from the pool only. The blob sidecar must not be removed from the blob store. Only after a blob transaction is finalized, its sidecar is removed from the blob store. This ensures that in case of a reorg, the sidecar is still available.
fn update_accounts(&self, accounts: Vec<ChangedAccount>)
fn update_accounts(&self, accounts: Vec<ChangedAccount>)
Updates the accounts in the pool
fn delete_blob(&self, tx: FixedBytes<32>)
fn delete_blob(&self, tx: FixedBytes<32>)
Deletes the blob sidecar for the given transaction from the blob store
fn delete_blobs(&self, txs: Vec<FixedBytes<32>>)
fn delete_blobs(&self, txs: Vec<FixedBytes<32>>)
Deletes multiple blob sidecars from the blob store
fn cleanup_blobs(&self)
fn cleanup_blobs(&self)
Maintenance function to cleanup blobs that are no longer needed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.