mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 11:21:07 +00:00
Refactor tx-pool maintenance and other high-level api (#4629)
* Reduction. * Reformation. * add locked timer stuff * fix issues and introduce full pool * arrange together * fix benches * fix new_light * Add revalidation test case * review fixes * review fixes * use just ready future * address review
This commit is contained in:
@@ -49,7 +49,7 @@ use std::{
|
||||
};
|
||||
use sysinfo::{get_current_pid, ProcessExt, System, SystemExt};
|
||||
use sc_telemetry::{telemetry, SUBSTRATE_INFO};
|
||||
use sp_transaction_pool::{TransactionPool, TransactionPoolMaintainer};
|
||||
use sp_transaction_pool::MaintainedTransactionPool;
|
||||
use sp_blockchain;
|
||||
use grafana_data_source::{self, record_metrics};
|
||||
|
||||
@@ -740,9 +740,7 @@ ServiceBuilder<
|
||||
TSc: Clone,
|
||||
TImpQu: 'static + ImportQueue<TBl>,
|
||||
TNetP: NetworkSpecialization<TBl>,
|
||||
TExPool: 'static
|
||||
+ TransactionPool<Block=TBl, Hash = <TBl as BlockT>::Hash>
|
||||
+ TransactionPoolMaintainer<Block=TBl, Hash = <TBl as BlockT>::Hash>,
|
||||
TExPool: MaintainedTransactionPool<Block=TBl, Hash = <TBl as BlockT>::Hash> + 'static,
|
||||
TRpc: sc_rpc::RpcExtension<sc_rpc::Metadata> + Clone,
|
||||
{
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ pub use self::builder::{
|
||||
};
|
||||
pub use config::{Configuration, Roles, PruningMode};
|
||||
pub use sc_chain_spec::{ChainSpec, Properties, RuntimeGenesis, Extension as ChainSpecExtension};
|
||||
pub use sp_transaction_pool::{TransactionPool, TransactionPoolMaintainer, InPoolTransaction, error::IntoPoolError};
|
||||
pub use sp_transaction_pool::{TransactionPool, InPoolTransaction, error::IntoPoolError};
|
||||
pub use sc_transaction_pool::txpool::Options as TransactionPoolOptions;
|
||||
pub use sc_client::FinalityNotifications;
|
||||
pub use sc_rpc::Metadata as RpcMetadata;
|
||||
@@ -148,8 +148,7 @@ pub trait AbstractService: 'static + Future<Output = Result<(), Error>> +
|
||||
/// Chain selection algorithm.
|
||||
type SelectChain: sp_consensus::SelectChain<Self::Block>;
|
||||
/// Transaction pool.
|
||||
type TransactionPool: TransactionPool<Block = Self::Block>
|
||||
+ TransactionPoolMaintainer<Block = Self::Block>;
|
||||
type TransactionPool: TransactionPool<Block = Self::Block>;
|
||||
/// Network specialization.
|
||||
type NetworkSpecialization: NetworkSpecialization<Self::Block>;
|
||||
|
||||
@@ -213,8 +212,7 @@ where
|
||||
TExec: 'static + sc_client::CallExecutor<TBl> + Send + Sync + Clone,
|
||||
TRtApi: 'static + Send + Sync,
|
||||
TSc: sp_consensus::SelectChain<TBl> + 'static + Clone + Send + Unpin,
|
||||
TExPool: 'static + TransactionPool<Block = TBl>
|
||||
+ TransactionPoolMaintainer<Block = TBl>,
|
||||
TExPool: 'static + TransactionPool<Block = TBl>,
|
||||
TOc: 'static + Send + Sync,
|
||||
TNetSpec: NetworkSpecialization<TBl>,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user