Struct sc_transaction_pool::BasicPool[][src]

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 with_revalidation_type(
    options: Options,
    pool_api: Arc<PoolApi>,
    prometheus: Option<&PrometheusRegistry>,
    revalidation_type: RevalidationType,
    spawner: impl SpawnNamed
) -> Self
[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.

impl<Block, Client, Fetcher> BasicPool<LightChainApi<Client, Fetcher, Block>, Block> where
    Block: BlockT,
    Client: HeaderBackend<Block> + 'static,
    Fetcher: Fetcher<Block> + 'static, 
[src]

pub fn new_light(
    options: Options,
    prometheus: Option<&PrometheusRegistry>,
    spawner: impl SpawnNamed,
    client: Arc<Client>,
    fetcher: Arc<Fetcher>
) -> Self
[src]

Create new basic transaction pool for a light node with the provided api.

impl<Block, Client> BasicPool<FullChainApi<Client, Block>, Block> where
    Block: BlockT,
    Client: ProvideRuntimeApi<Block> + BlockBackend<Block> + BlockIdTo<Block>,
    Client: ExecutorProvider<Block> + Send + Sync + 'static,
    Client::Api: TaggedTransactionQueue<Block>,
    ApiErrorFor<Client, Block>: Send + Display
[src]

pub fn new_full(
    options: Options,
    prometheus: Option<&PrometheusRegistry>,
    spawner: impl SpawnNamed,
    client: Arc<Client>
) -> Arc<Self>
[src]

Create new basic transaction pool for a full node with the provided api.

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>

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

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> Instrument for T[src]

impl<T> Instrument for T[src]

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

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

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

Get a reference to the inner from the outer.

pub 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> Pointable for T[src]

type Init = T

The type for initializers.

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
    T: Bounded,
    S: TryInto<T>, 
[src]

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