mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 02:45:50 +00:00
Remove txpool as an export of sc_transaction_pool, exporting the used components instead. (#9217)
* Remove `txpool` as an export of `sc_transaction_pool`, exporting the used components instead. * Fix tests
This commit is contained in:
@@ -25,7 +25,7 @@ use sp_runtime::{
|
||||
generic::BlockId,
|
||||
};
|
||||
use futures::prelude::*;
|
||||
use sc_transaction_pool::txpool;
|
||||
use sc_transaction_pool::{ChainApi, Pool};
|
||||
use sp_consensus::{
|
||||
self, BlockImport, Environment, Proposer, ForkChoiceStrategy,
|
||||
BlockImportParams, BlockOrigin, ImportResult, SelectChain, StateAction,
|
||||
@@ -40,7 +40,7 @@ use sp_api::{ProvideRuntimeApi, TransactionFor};
|
||||
pub const MAX_PROPOSAL_DURATION: u64 = 10;
|
||||
|
||||
/// params for sealing a new block
|
||||
pub struct SealBlockParams<'a, B: BlockT, BI, SC, C: ProvideRuntimeApi<B>, E, P: txpool::ChainApi, CIDP> {
|
||||
pub struct SealBlockParams<'a, B: BlockT, BI, SC, C: ProvideRuntimeApi<B>, E, P: ChainApi, CIDP> {
|
||||
/// if true, empty blocks(without extrinsics) will be created.
|
||||
/// otherwise, will return Error::EmptyTransactionPool.
|
||||
pub create_empty: bool,
|
||||
@@ -51,7 +51,7 @@ pub struct SealBlockParams<'a, B: BlockT, BI, SC, C: ProvideRuntimeApi<B>, E, P:
|
||||
/// sender to report errors/success to the rpc.
|
||||
pub sender: rpc::Sender<CreatedBlock<<B as BlockT>::Hash>>,
|
||||
/// transaction pool
|
||||
pub pool: Arc<txpool::Pool<P>>,
|
||||
pub pool: Arc<Pool<P>>,
|
||||
/// header backend
|
||||
pub client: Arc<C>,
|
||||
/// Environment trait object for creating a proposer
|
||||
@@ -90,7 +90,7 @@ pub async fn seal_block<B, BI, SC, C, E, P, CIDP>(
|
||||
C: HeaderBackend<B> + ProvideRuntimeApi<B>,
|
||||
E: Environment<B>,
|
||||
E::Proposer: Proposer<B, Transaction = TransactionFor<C, B>>,
|
||||
P: txpool::ChainApi<Block = B>,
|
||||
P: ChainApi<Block = B>,
|
||||
SC: SelectChain<B>,
|
||||
TransactionFor<C, B>: 'static,
|
||||
CIDP: CreateInherentDataProviders<B, ()>,
|
||||
|
||||
Reference in New Issue
Block a user