[][src]Trait sc_network::config::TransactionPool

pub trait TransactionPool<H: ExHashT, B: BlockT>: Send + Sync {
    fn transactions(&self) -> Vec<(H, B::Extrinsic)>;
fn hash_of(&self, transaction: &B::Extrinsic) -> H;
fn import(&self, transaction: B::Extrinsic) -> TransactionImportFuture;
fn on_broadcasted(&self, propagations: HashMap<H, Vec<String>>);
fn transaction(&self, hash: &H) -> Option<B::Extrinsic>; }

Transaction pool interface

Required methods

fn transactions(&self) -> Vec<(H, B::Extrinsic)>

Get transactions from the pool that are ready to be propagated.

fn hash_of(&self, transaction: &B::Extrinsic) -> H

Get hash of transaction.

fn import(&self, transaction: B::Extrinsic) -> TransactionImportFuture

Import a transaction into the pool.

This will return future.

fn on_broadcasted(&self, propagations: HashMap<H, Vec<String>>)

Notify the pool about transactions broadcast.

fn transaction(&self, hash: &H) -> Option<B::Extrinsic>

Get transaction by hash.

Loading content...

Implementors

impl<H: ExHashT + Default, B: BlockT> TransactionPool<H, B> for EmptyTransactionPool[src]

Loading content...