,
}
/// Start an import queue for the Aura consensus algorithm.
pub fn import_queue(
ImportQueueParams {
block_import,
client,
create_inherent_data_providers,
spawner,
registry,
telemetry,
}: ImportQueueParams<'_, I, C, CIDP, S>,
) -> Result, sp_consensus::Error>
where
Block: BlockT,
C::Api: BlockBuilderApi + AuraApi + ApiExt,
C: 'static
+ ProvideRuntimeApi
+ BlockOf
+ Send
+ Sync
+ AuxStore
+ UsageProvider
+ HeaderBackend,
I: BlockImport
+ ParachainBlockImportMarker
+ Send
+ Sync
+ 'static,
P: Pair + 'static,
P::Public: Debug + Codec,
P::Signature: Codec,
S: sp_core::traits::SpawnEssentialNamed,
CIDP: CreateInherentDataProviders + Sync + Send + 'static,
CIDP::InherentDataProviders: InherentDataProviderExt + Send + Sync,
{
sc_consensus_aura::import_queue::(sc_consensus_aura::ImportQueueParams {
block_import,
justification_import: None,
client,
create_inherent_data_providers,
spawner,
registry,
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
telemetry,
compatibility_mode: CompatibilityMode::None,
})
}
/// Parameters of [`build_verifier`].
pub struct BuildVerifierParams {
/// The client to interact with the chain.
pub client: Arc,
/// The inherent data providers, to create the inherent data.
pub create_inherent_data_providers: CIDP,
/// The telemetry handle.
pub telemetry: Option,
}
/// Build the [`AuraVerifier`].
pub fn build_verifier(
BuildVerifierParams { client, create_inherent_data_providers, telemetry }: BuildVerifierParams<
C,
CIDP,
>,
) -> AuraVerifier {
sc_consensus_aura::build_verifier(sc_consensus_aura::BuildVerifierParams {
client,
create_inherent_data_providers,
telemetry,
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
compatibility_mode: CompatibilityMode::None,
})
}