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

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

Transaction pool interface

Required methods

pub fn transactions(&self) -> Vec<(H, B::Extrinsic)>[src]

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

pub fn hash_of(&self, transaction: &B::Extrinsic) -> H[src]

Get hash of transaction.

pub fn import(&self, transaction: B::Extrinsic) -> TransactionImportFuture[src]

Import a transaction into the pool.

This will return future.

pub fn on_broadcasted(&self, propagations: HashMap<H, Vec<String>>)[src]

Notify the pool about transactions broadcast.

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

Get transaction by hash.

Loading content...

Implementors

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

Loading content...