mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-24 14:47:59 +00:00
Companion for aura CompatibilityMode (#1803)
* Companion for aura CompatibilityMode
As no parachain was launched with the broken authority set change handling we don't need to expose
the compatibility mode.
* FMT
* update lockfile for {"substrate", "polkadot"}
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+253
-253
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@ use codec::Codec;
|
||||
use cumulus_client_consensus_common::ParachainBlockImport;
|
||||
use sc_client_api::{backend::AuxStore, BlockOf, UsageProvider};
|
||||
use sc_consensus::{import_queue::DefaultImportQueue, BlockImport};
|
||||
use sc_consensus_aura::AuraVerifier;
|
||||
use sc_consensus_aura::{AuraVerifier, CompatibilityMode};
|
||||
use sc_consensus_slots::InherentDataProviderExt;
|
||||
use sc_telemetry::TelemetryHandle;
|
||||
use sp_api::{ApiExt, ProvideRuntimeApi};
|
||||
@@ -92,6 +92,7 @@ where
|
||||
registry,
|
||||
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
||||
telemetry,
|
||||
compatibility_mode: CompatibilityMode::None,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -106,16 +107,17 @@ pub struct BuildVerifierParams<C, CIDP> {
|
||||
}
|
||||
|
||||
/// Build the [`AuraVerifier`].
|
||||
pub fn build_verifier<P, C, CIDP>(
|
||||
pub fn build_verifier<P, C, CIDP, N>(
|
||||
BuildVerifierParams { client, create_inherent_data_providers, telemetry }: BuildVerifierParams<
|
||||
C,
|
||||
CIDP,
|
||||
>,
|
||||
) -> AuraVerifier<C, P, CIDP> {
|
||||
) -> AuraVerifier<C, P, CIDP, N> {
|
||||
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,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -143,6 +143,7 @@ where
|
||||
telemetry,
|
||||
block_proposal_slot_portion,
|
||||
max_block_proposal_slot_portion,
|
||||
compatibility_mode: sc_consensus_aura::CompatibilityMode::None,
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -1029,23 +1029,25 @@ where
|
||||
let aura_verifier = move || {
|
||||
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client2).unwrap();
|
||||
|
||||
Box::new(cumulus_client_consensus_aura::build_verifier::<<AuraId as AppKey>::Pair, _, _>(
|
||||
cumulus_client_consensus_aura::BuildVerifierParams {
|
||||
client: client2.clone(),
|
||||
create_inherent_data_providers: move |_, _| async move {
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
Box::new(
|
||||
cumulus_client_consensus_aura::build_verifier::<<AuraId as AppKey>::Pair, _, _, _>(
|
||||
cumulus_client_consensus_aura::BuildVerifierParams {
|
||||
client: client2.clone(),
|
||||
create_inherent_data_providers: move |_, _| async move {
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
|
||||
let slot =
|
||||
let slot =
|
||||
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
*timestamp,
|
||||
slot_duration,
|
||||
);
|
||||
|
||||
Ok((slot, timestamp))
|
||||
Ok((slot, timestamp))
|
||||
},
|
||||
telemetry: telemetry_handle,
|
||||
},
|
||||
telemetry: telemetry_handle,
|
||||
},
|
||||
)) as Box<_>
|
||||
),
|
||||
) as Box<_>
|
||||
};
|
||||
|
||||
let relay_chain_verifier =
|
||||
|
||||
Reference in New Issue
Block a user