mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Companion - Independence for Slot-based algorithms from timestamp (#1617)
* Companion for Substrate #12224 * update lockfile for {"polkadot", "substrate"} Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+250
-251
File diff suppressed because it is too large
Load Diff
@@ -201,7 +201,6 @@ where
|
|||||||
|
|
||||||
let info = SlotInfo::new(
|
let info = SlotInfo::new(
|
||||||
inherent_data_providers.slot(),
|
inherent_data_providers.slot(),
|
||||||
inherent_data_providers.timestamp(),
|
|
||||||
inherent_data,
|
inherent_data,
|
||||||
self.slot_duration.as_duration(),
|
self.slot_duration.as_duration(),
|
||||||
parent.clone(),
|
parent.clone(),
|
||||||
|
|||||||
@@ -427,15 +427,15 @@ pub fn parachain_build_import_queue(
|
|||||||
block_import: client.clone(),
|
block_import: client.clone(),
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
create_inherent_data_providers: move |_, _| async move {
|
create_inherent_data_providers: move |_, _| async move {
|
||||||
let time = sp_timestamp::InherentDataProvider::from_system_time();
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
|
|
||||||
let slot =
|
let slot =
|
||||||
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||||
*time,
|
*timestamp,
|
||||||
slot_duration,
|
slot_duration,
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok((time, slot))
|
Ok((slot, timestamp))
|
||||||
},
|
},
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
@@ -494,11 +494,11 @@ pub async fn start_parachain_node(
|
|||||||
&validation_data,
|
&validation_data,
|
||||||
id,
|
id,
|
||||||
).await;
|
).await;
|
||||||
let time = sp_timestamp::InherentDataProvider::from_system_time();
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
|
|
||||||
let slot =
|
let slot =
|
||||||
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||||
*time,
|
*timestamp,
|
||||||
slot_duration,
|
slot_duration,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -507,7 +507,7 @@ pub async fn start_parachain_node(
|
|||||||
"Failed to create parachain inherent",
|
"Failed to create parachain inherent",
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
Ok((time, slot, parachain_inherent))
|
Ok((slot, timestamp, parachain_inherent))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
block_import: client.clone(),
|
block_import: client.clone(),
|
||||||
|
|||||||
@@ -722,7 +722,7 @@ pub fn rococo_parachain_build_import_queue(
|
|||||||
slot_duration,
|
slot_duration,
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok((timestamp, slot))
|
Ok((slot, timestamp))
|
||||||
},
|
},
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
@@ -797,7 +797,7 @@ pub async fn start_rococo_parachain_node(
|
|||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok((timestamp, slot, parachain_inherent))
|
Ok((slot, timestamp, parachain_inherent))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
block_import: client.clone(),
|
block_import: client.clone(),
|
||||||
@@ -1096,7 +1096,7 @@ where
|
|||||||
slot_duration,
|
slot_duration,
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok((timestamp, slot))
|
Ok((slot, timestamp))
|
||||||
},
|
},
|
||||||
telemetry: telemetry_handle,
|
telemetry: telemetry_handle,
|
||||||
},
|
},
|
||||||
@@ -1223,7 +1223,7 @@ where
|
|||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok((timestamp, slot, parachain_inherent))
|
Ok((slot, timestamp, parachain_inherent))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
block_import: client2.clone(),
|
block_import: client2.clone(),
|
||||||
@@ -1537,7 +1537,7 @@ pub fn contracts_rococo_build_import_queue(
|
|||||||
slot_duration,
|
slot_duration,
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok((timestamp, slot))
|
Ok((slot, timestamp))
|
||||||
},
|
},
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
@@ -1611,7 +1611,7 @@ pub async fn start_contracts_rococo_node(
|
|||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok((timestamp, slot, parachain_inherent))
|
Ok((slot, timestamp, parachain_inherent))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
block_import: client.clone(),
|
block_import: client.clone(),
|
||||||
|
|||||||
Reference in New Issue
Block a user