[][src]Struct sc_transaction_pool::BasicPool

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

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

Implementations

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

pub fn new(
    options: Options,
    pool_api: Arc<PoolApi>,
    prometheus: Option<&PrometheusRegistry>
) -> (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>,
    prometheus: Option<&PrometheusRegistry>,
    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<Block, Client> LocalTransactionPool for BasicPool<FullChainApi<Client, Block>, Block> where
    Block: BlockT,
    Client: ProvideRuntimeApi<Block> + BlockBackend<Block> + BlockIdTo<Block>,
    Client: Send + Sync + 'static,
    Client::Api: TaggedTransactionQueue<Block>,
    ApiErrorFor<Client, Block>: Send + Display
[src]

type Block = Block

Block type.

type Hash = ExtrinsicHash<FullChainApi<Client, Block>>

Transaction hash type.

type Error = <FullChainApi<Client, Block> as ChainApi>::Error

Error type.

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

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

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

type Block = PoolApi::Block

Block type.

type Hash = ExtrinsicHash<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
[src]

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

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

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
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]