[][src]Trait sp_transaction_pool::OffchainSubmitTransaction

pub trait OffchainSubmitTransaction<Block: BlockT>: Send + Sync {
    pub fn submit_at(
        &self,
        at: &BlockId<Block>,
        extrinsic: Block::Extrinsic
    ) -> Result<(), ()>; }

An abstraction for transaction pool.

This trait is used by offchain calls to be able to submit transactions. The main use case is for offchain workers, to feed back the results of computations, but since the transaction pool access is a separate ExternalitiesExtension it can be also used in context of other offchain calls. For one may generate and submit a transaction for some misbehavior reports (say equivocation).

Required methods

pub fn submit_at(
    &self,
    at: &BlockId<Block>,
    extrinsic: Block::Extrinsic
) -> Result<(), ()>
[src]

Submit transaction.

The transaction will end up in the pool and be propagated to others.

Loading content...

Implementors

impl<TPool: LocalTransactionPool> OffchainSubmitTransaction<<TPool as LocalTransactionPool>::Block> for TPool[src]

Loading content...