Skip to main content

TxPoolPrewarmSource

Trait TxPoolPrewarmSource 

Source
pub trait TxPoolPrewarmSource<N: NodePrimitives>:
    Send
    + Sync
    + Debug {
    // Required method
    fn best_transactions(&self, parent_hash: B256) -> Option<Transactions<N>>;
}
Expand description

Source of txpool transactions for best-effort cache prewarming.

Required Methods§

Source

fn best_transactions(&self, parent_hash: B256) -> Option<Transactions<N>>

Opens a live best-transactions iterator for parent_hash.

The worker opens this once per canonical parent and retains it across empty polls, snapshot publications, and validation pauses. Sources should return None if they are not yet tracking parent_hash.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§