pub trait LocalTransactionPool: Send + Sync {
    type Block: BlockT;
    type Hash: Hash + Eq + Member + Serialize;
    type Error: From<Error> + IntoPoolError;

    // Required method
    fn submit_local(
        &self,
        at: <Self::Block as BlockT>::Hash,
        xt: LocalTransactionFor<Self>
    ) -> Result<Self::Hash, Self::Error>;
}
Expand description

Transaction pool interface for submitting local transactions that exposes a blocking interface for submission.

Required Associated Types§

source

type Block: BlockT

Block type.

source

type Hash: Hash + Eq + Member + Serialize

Transaction hash type.

source

type Error: From<Error> + IntoPoolError

Error type.

Required Methods§

source

fn submit_local( &self, at: <Self::Block as BlockT>::Hash, xt: LocalTransactionFor<Self> ) -> Result<Self::Hash, Self::Error>

Submits the given local unverified transaction to the pool blocking the current thread for any necessary pre-verification. NOTE: It MUST NOT be used for transactions that originate from the network or RPC, since the validation is performed with TransactionSource::Local.

Implementations on Foreign Types§

source§

impl<T: LocalTransactionPool> LocalTransactionPool for Arc<T>

§

type Block = <T as LocalTransactionPool>::Block

§

type Hash = <T as LocalTransactionPool>::Hash

§

type Error = <T as LocalTransactionPool>::Error

source§

fn submit_local( &self, at: <Self::Block as BlockT>::Hash, xt: LocalTransactionFor<Self> ) -> Result<Self::Hash, Self::Error>

Implementors§

source§

impl<Block: BlockT> LocalTransactionPool for RejectAllTxPool<Block>

§

type Block = Block

§

type Hash = <Block as Block>::Hash

§

type Error = Error