[][src]Struct sc_transaction_pool::BasicPool

pub struct BasicPool<PoolApi, Block> where
    Block: BlockT,
    PoolApi: ChainApi<Block = Block, Hash = Block::Hash>, 
{ /* fields omitted */ }

Basic implementation of transaction pool that can be customized by providing PoolApi.

Methods

impl<PoolApi, Block> BasicPool<PoolApi, Block> where
    Block: BlockT,
    PoolApi: ChainApi<Block = Block, Hash = Block::Hash> + 'static, 
[src]

pub fn new(
    options: Options,
    pool_api: Arc<PoolApi>
) -> (Self, Option<Pin<Box<dyn Future<Output = ()> + Send>>>)
[src]

Create new basic transaction pool with provided api.

It will also optionally return background task that might be started by the caller.

pub fn with_revalidation_type(
    options: Options,
    pool_api: Arc<PoolApi>,
    revalidation_type: RevalidationType
) -> (Self, Option<Pin<Box<dyn Future<Output = ()> + Send>>>)
[src]

Create new basic transaction pool with provided api and custom revalidation type.

pub fn pool(&self) -> &Arc<Pool<PoolApi>>[src]

Gets shared reference to the underlying pool.

Trait Implementations

impl<PoolApi, Block> MaintainedTransactionPool for BasicPool<PoolApi, Block> where
    Block: BlockT,
    PoolApi: 'static + ChainApi<Block = Block, Hash = Block::Hash>, 
[src]

impl<PoolApi, Block> MallocSizeOf for BasicPool<PoolApi, Block> where
    PoolApi: ChainApi<Block = Block, Hash = Block::Hash>,
    PoolApi::Hash: MallocSizeOf,
    Block: BlockT
[src]

impl<PoolApi, Block> TransactionPool for BasicPool<PoolApi, Block> where
    Block: BlockT,
    PoolApi: 'static + ChainApi<Block = Block, Hash = Block::Hash>, 
[src]

type Block = PoolApi::Block

Block type.

type Hash = ExHash<PoolApi>

Transaction hash type.

type InPoolTransaction = Transaction<TxHash<Self>, TransactionFor<Self>>

In-pool transaction type.

type Error = PoolApi::Error

Error type.

Auto Trait Implementations

impl<PoolApi, Block> !RefUnwindSafe for BasicPool<PoolApi, Block>

impl<PoolApi, Block> Send for BasicPool<PoolApi, Block> where
    <Block as Block>::Extrinsic: Send + Sync,
    <Block as Block>::Hash: Send + Sync,
    <Block as Block>::Header: Header,
    <<Block as Block>::Header as Header>::Number: Send

impl<PoolApi, Block> Sync for BasicPool<PoolApi, Block> where
    <Block as Block>::Extrinsic: Send + Sync,
    <Block as Block>::Hash: Send + Sync,
    <Block as Block>::Header: Header,
    <<Block as Block>::Header as Header>::Number: Send

impl<PoolApi, Block> Unpin for BasicPool<PoolApi, Block>

impl<PoolApi, Block> !UnwindSafe for BasicPool<PoolApi, Block>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MallocSizeOfExt for T where
    T: MallocSizeOf
[src]

impl<T> MaybeMallocSizeOf for T where
    T: MallocSizeOf

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,