Trait polkadot_node_network_protocol::request_response::network::TransactionPool [−][src]
pub trait TransactionPool<H, B>: Send + Sync where
H: ExHashT,
B: Block, {
fn transactions(&self) -> Vec<(H, <B as Block>::Extrinsic), Global>;
fn hash_of(&self, transaction: &<B as Block>::Extrinsic) -> H;
fn import(
&self,
transaction: <B as Block>::Extrinsic
) -> Pin<Box<dyn Future<Output = TransactionImport> + Send + 'static, Global>>;
fn on_broadcasted(
&self,
propagations: HashMap<H, Vec<String, Global>, RandomState>
);
fn transaction(&self, hash: &H) -> Option<<B as Block>::Extrinsic>;
}
Expand description
Transaction pool interface
Required methods
Get transactions from the pool that are ready to be propagated.
Import a transaction into the pool.
This will return future.
fn on_broadcasted(
&self,
propagations: HashMap<H, Vec<String, Global>, RandomState>
)
fn on_broadcasted(
&self,
propagations: HashMap<H, Vec<String, Global>, RandomState>
)
Notify the pool about transactions broadcast.