mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 15:31:08 +00:00
Add a DefaultQueue type alias to remove the need to use sp_api::TransactionFor (#6761)
* Add DefaultQueue * Add DefaultImportQueue to the top level of sp-consensus
This commit is contained in:
@@ -47,7 +47,7 @@ use sp_consensus::{
|
||||
BlockOrigin, Error as ConsensusError, SelectChain, SlotData, BlockCheckParams, ImportResult
|
||||
};
|
||||
use sp_consensus::import_queue::{
|
||||
Verifier, BasicQueue, BoxJustificationImport, BoxFinalityProofImport,
|
||||
Verifier, BasicQueue, DefaultImportQueue, BoxJustificationImport, BoxFinalityProofImport,
|
||||
};
|
||||
use sc_client_api::{backend::AuxStore, BlockOf};
|
||||
use sp_blockchain::{
|
||||
@@ -713,9 +713,6 @@ fn authorities<A, B, C>(client: &C, at: &BlockId<B>) -> Result<Vec<A>, Consensus
|
||||
.ok_or_else(|| sp_consensus::Error::InvalidAuthoritiesSet.into())
|
||||
}
|
||||
|
||||
/// The Aura import queue type.
|
||||
pub type AuraImportQueue<B, Client> = BasicQueue<B, sp_api::TransactionFor<Client, B>>;
|
||||
|
||||
/// Register the aura inherent data provider, if not registered already.
|
||||
fn register_aura_inherent_data_provider(
|
||||
inherent_data_providers: &InherentDataProviders,
|
||||
@@ -824,7 +821,7 @@ pub fn import_queue<B, I, C, P, S>(
|
||||
inherent_data_providers: InherentDataProviders,
|
||||
spawner: &S,
|
||||
registry: Option<&Registry>,
|
||||
) -> Result<AuraImportQueue<B, C>, sp_consensus::Error> where
|
||||
) -> Result<DefaultImportQueue<B, C>, sp_consensus::Error> where
|
||||
B: BlockT,
|
||||
C::Api: BlockBuilderApi<B> + AuraApi<B, AuthorityId<P>> + ApiExt<B, Error = sp_blockchain::Error>,
|
||||
C: 'static + ProvideRuntimeApi<B> + BlockOf + ProvideCache<B> + Send + Sync + AuxStore + HeaderBackend<B>,
|
||||
|
||||
@@ -100,7 +100,7 @@ use sp_consensus::{
|
||||
};
|
||||
use sp_consensus_babe::inherents::BabeInherentData;
|
||||
use sp_timestamp::{TimestampInherentData, InherentType as TimestampInherent};
|
||||
use sp_consensus::import_queue::{Verifier, BasicQueue, CacheKeyId};
|
||||
use sp_consensus::import_queue::{Verifier, BasicQueue, DefaultImportQueue, CacheKeyId};
|
||||
use sc_client_api::{
|
||||
backend::AuxStore,
|
||||
BlockchainEvents, ProvideUncles,
|
||||
@@ -967,9 +967,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// The BABE import queue type.
|
||||
pub type BabeImportQueue<B, Client> = BasicQueue<B, sp_api::TransactionFor<Client, B>>;
|
||||
|
||||
/// Register the babe inherent data provider, if not registered already.
|
||||
fn register_babe_inherent_data_provider(
|
||||
inherent_data_providers: &InherentDataProviders,
|
||||
@@ -1368,7 +1365,7 @@ pub fn import_queue<Block: BlockT, Client, SelectChain, Inner>(
|
||||
inherent_data_providers: InherentDataProviders,
|
||||
spawner: &impl sp_core::traits::SpawnNamed,
|
||||
registry: Option<&Registry>,
|
||||
) -> ClientResult<BabeImportQueue<Block, Client>> where
|
||||
) -> ClientResult<DefaultImportQueue<Block, Client>> where
|
||||
Inner: BlockImport<Block, Error = ConsensusError, Transaction = sp_api::TransactionFor<Client, Block>>
|
||||
+ Send + Sync + 'static,
|
||||
Client: ProvideRuntimeApi<Block> + ProvideCache<Block> + Send + Sync + AuxStore + 'static,
|
||||
|
||||
Reference in New Issue
Block a user