sc_transaction_pool/
lib.rs1#![recursion_limit = "256"]
22#![warn(missing_docs)]
23#![warn(unused_extern_crates)]
24
25mod builder;
26mod common;
27mod fork_aware_txpool;
28mod graph;
29mod single_state_txpool;
30mod transaction_pool_wrapper;
31
32use common::{api, enactment_state};
33use std::{future::Future, pin::Pin, sync::Arc};
34
35pub use api::FullChainApi;
36pub use builder::{Builder, TransactionPoolHandle, TransactionPoolOptions, TransactionPoolType};
37pub use common::notification_future;
38pub use fork_aware_txpool::{ForkAwareTxPool, ForkAwareTxPoolTask};
39pub use graph::{base_pool::Limit as PoolLimit, ChainApi, Options, Pool};
40use single_state_txpool::prune_known_txs_for_block;
41pub use single_state_txpool::{BasicPool, RevalidationType};
42pub use transaction_pool_wrapper::TransactionPoolWrapper;
43
44type BoxedReadyIterator<Hash, Data> = Box<
45 dyn sc_transaction_pool_api::ReadyTransactions<
46 Item = Arc<graph::base_pool::Transaction<Hash, Data>>,
47 > + Send,
48>;
49
50type ReadyIteratorFor<PoolApi> =
51 BoxedReadyIterator<graph::ExtrinsicHash<PoolApi>, graph::ExtrinsicFor<PoolApi>>;
52
53type PolledIterator<PoolApi> = Pin<Box<dyn Future<Output = ReadyIteratorFor<PoolApi>> + Send>>;
54
55pub const LOG_TARGET: &str = "txpool";