mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
Fixup multi-collator parachain transition to async backing (#3510)
Fixing: ``` Verification failed for block 0x07bbf1e04121d70a4bdb21cc055132b53ac2390fa95c4d05497fc91b1e8bf7f5 received from (12D3KooWJzLd8skcAgA24EcJey7aJAhYctfUxWGjSP5Usk9wbpPZ): "Header 0x07bbf1e04121d70a4bdb21cc055132b53ac2390fa95c4d05497fc91b1e8bf7f5 rejected: too far in the future" ``` --------- Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io> Co-authored-by: Dmitry Sinyavin <dmitry.sinyavin@parity.io> Co-authored-by: s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
committed by
GitHub
parent
eefd5fe449
commit
833bafdbf7
@@ -1251,28 +1251,33 @@ where
|
||||
<<AuraId as AppCrypto>::Pair as Pair>::Signature:
|
||||
TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec,
|
||||
{
|
||||
let client2 = client.clone();
|
||||
let verifier_client = client.clone();
|
||||
|
||||
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 AppCrypto>::Pair,
|
||||
_,
|
||||
_,
|
||||
_,
|
||||
>(cumulus_client_consensus_aura::BuildVerifierParams {
|
||||
client: client2.clone(),
|
||||
create_inherent_data_providers: move |_, _| async move {
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
client: verifier_client.clone(),
|
||||
create_inherent_data_providers: move |parent_hash, _| {
|
||||
let cidp_client = verifier_client.clone();
|
||||
async move {
|
||||
let slot_duration = cumulus_client_consensus_aura::slot_duration_at(
|
||||
&*cidp_client,
|
||||
parent_hash,
|
||||
)?;
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
|
||||
let slot =
|
||||
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
*timestamp,
|
||||
slot_duration,
|
||||
);
|
||||
let slot =
|
||||
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
*timestamp,
|
||||
slot_duration,
|
||||
);
|
||||
|
||||
Ok((slot, timestamp))
|
||||
Ok((slot, timestamp))
|
||||
}
|
||||
},
|
||||
telemetry: telemetry_handle,
|
||||
})) as Box<_>
|
||||
|
||||
Reference in New Issue
Block a user