Struct sc_transaction_pool::BasicPool [−][src]
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]
Block: BlockT,
PoolApi: ChainApi<Block = Block> + 'static,
pub fn with_revalidation_type(
options: Options,
pool_api: Arc<PoolApi>,
prometheus: Option<&PrometheusRegistry>,
revalidation_type: RevalidationType,
spawner: impl SpawnNamed
) -> Self
[src]
options: Options,
pool_api: Arc<PoolApi>,
prometheus: Option<&PrometheusRegistry>,
revalidation_type: RevalidationType,
spawner: impl SpawnNamed
) -> Self
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]
Block: BlockT,
Client: HeaderBackend<Block> + 'static,
Fetcher: Fetcher<Block> + 'static,
pub fn new_light(
options: Options,
prometheus: Option<&PrometheusRegistry>,
spawner: impl SpawnNamed,
client: Arc<Client>,
fetcher: Arc<Fetcher>
) -> Self
[src]
options: Options,
prometheus: Option<&PrometheusRegistry>,
spawner: impl SpawnNamed,
client: Arc<Client>,
fetcher: Arc<Fetcher>
) -> Self
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]
Block: BlockT,
Client: ProvideRuntimeApi<Block> + BlockBackend<Block> + BlockIdTo<Block>,
Client: ExecutorProvider<Block> + Send + Sync + 'static,
Client::Api: TaggedTransactionQueue<Block>,
ApiErrorFor<Client, Block>: Send + Display,
pub fn new_full(
options: Options,
prometheus: Option<&PrometheusRegistry>,
spawner: impl SpawnNamed,
client: Arc<Client>
) -> Arc<Self>
[src]
options: Options,
prometheus: Option<&PrometheusRegistry>,
spawner: impl SpawnNamed,
client: Arc<Client>
) -> Arc<Self>
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]
Block: BlockT,
Client: ProvideRuntimeApi<Block> + BlockBackend<Block> + BlockIdTo<Block>,
Client: Send + Sync + 'static,
Client::Api: TaggedTransactionQueue<Block>,
ApiErrorFor<Client, Block>: Send + Display,
type Block = Block
Block type.
type Hash = ExtrinsicHash<FullChainApi<Client, Block>>
Transaction hash type.
type Error = <FullChainApi<Client, Block> as ChainApi>::Error
Error type.
fn submit_local(
&self,
at: &BlockId<Self::Block>,
xt: LocalTransactionFor<Self>
) -> Result<Self::Hash, Self::Error>
[src]
&self,
at: &BlockId<Self::Block>,
xt: LocalTransactionFor<Self>
) -> Result<Self::Hash, Self::Error>
impl<PoolApi, Block> MaintainedTransactionPool for BasicPool<PoolApi, Block> where
Block: BlockT,
PoolApi: 'static + ChainApi<Block = Block>,
[src]
Block: BlockT,
PoolApi: 'static + ChainApi<Block = Block>,
fn maintain(
&self,
event: ChainEvent<Self::Block>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
[src]
&self,
event: ChainEvent<Self::Block>
) -> Pin<Box<dyn Future<Output = ()> + Send>>
impl<PoolApi, Block> MallocSizeOf for BasicPool<PoolApi, Block> where
PoolApi: ChainApi<Block = Block>,
Block: BlockT,
[src]
PoolApi: ChainApi<Block = Block>,
Block: BlockT,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
pub fn constant_size() -> Option<usize>
[src]
impl<PoolApi, Block> TransactionPool for BasicPool<PoolApi, Block> where
Block: BlockT,
PoolApi: 'static + ChainApi<Block = Block>,
[src]
Block: BlockT,
PoolApi: 'static + ChainApi<Block = Block>,
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.
fn submit_at(
&self,
at: &BlockId<Self::Block>,
source: TransactionSource,
xts: Vec<TransactionFor<Self>>
) -> PoolFuture<Vec<Result<TxHash<Self>, Self::Error>>, Self::Error>
[src]
&self,
at: &BlockId<Self::Block>,
source: TransactionSource,
xts: Vec<TransactionFor<Self>>
) -> PoolFuture<Vec<Result<TxHash<Self>, Self::Error>>, Self::Error>
fn submit_one(
&self,
at: &BlockId<Self::Block>,
source: TransactionSource,
xt: TransactionFor<Self>
) -> PoolFuture<TxHash<Self>, Self::Error>
[src]
&self,
at: &BlockId<Self::Block>,
source: TransactionSource,
xt: TransactionFor<Self>
) -> PoolFuture<TxHash<Self>, Self::Error>
fn submit_and_watch(
&self,
at: &BlockId<Self::Block>,
source: TransactionSource,
xt: TransactionFor<Self>
) -> PoolFuture<Box<TransactionStatusStreamFor<Self>>, Self::Error>
[src]
&self,
at: &BlockId<Self::Block>,
source: TransactionSource,
xt: TransactionFor<Self>
) -> PoolFuture<Box<TransactionStatusStreamFor<Self>>, Self::Error>
fn remove_invalid(
&self,
hashes: &[TxHash<Self>]
) -> Vec<Arc<Self::InPoolTransaction>>
[src]
&self,
hashes: &[TxHash<Self>]
) -> Vec<Arc<Self::InPoolTransaction>>
fn status(&self) -> PoolStatus
[src]
fn import_notification_stream(&self) -> ImportNotificationStream<TxHash<Self>>
[src]
fn hash_of(&self, xt: &TransactionFor<Self>) -> TxHash<Self>
[src]
fn on_broadcasted(&self, propagations: HashMap<TxHash<Self>, Vec<String>>)
[src]
fn ready_transaction(
&self,
hash: &TxHash<Self>
) -> Option<Arc<Self::InPoolTransaction>>
[src]
&self,
hash: &TxHash<Self>
) -> Option<Arc<Self::InPoolTransaction>>
fn ready_at(
&self,
at: NumberFor<Self::Block>
) -> Pin<Box<dyn Future<Output = Box<dyn Iterator<Item = Arc<Transaction<ExtrinsicHash<PoolApi>, ExtrinsicFor<PoolApi>>>> + Send>> + Send>>
[src]
&self,
at: NumberFor<Self::Block>
) -> Pin<Box<dyn Future<Output = Box<dyn Iterator<Item = Arc<Transaction<ExtrinsicHash<PoolApi>, ExtrinsicFor<PoolApi>>>> + Send>> + Send>>
fn ready(
&self
) -> Box<dyn Iterator<Item = Arc<Transaction<ExtrinsicHash<PoolApi>, ExtrinsicFor<PoolApi>>>> + Send>
[src]
&self
) -> Box<dyn Iterator<Item = Arc<Transaction<ExtrinsicHash<PoolApi>, ExtrinsicFor<PoolApi>>>> + Send>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
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]
T: MallocSizeOf,
pub fn malloc_size_of(&self) -> usize
[src]
impl<T> MaybeMallocSizeOf for T where
T: MallocSizeOf,
[src]
T: MallocSizeOf,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
[src]
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
[src]
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
[src]
Self: UniqueSaturatedInto<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
[src]
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
[src]
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,