mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Reduce provisioner work (#12749)
* Move create_inherent_data call to use side * Make provide_inherent_data async * Fix tests * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * Log errors * Fix test * Fix test * fix * Deduplicate test code * fix * flag * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Revert "Deduplicate test code" This reverts commit ba46adbe089329c78cd69ccdb08e27ed67bd77cf. * Fix test * remove commented out code * minor to start CI run * start CI * Update client/consensus/slots/src/lib.rs Co-authored-by: Marcin S. <marcin@bytedude.com> * Apply PR suggestions * Apply PR suggestions * Update client/consensus/slots/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * minor * kickoff CI * PR suggestions * Compute remaining duration instead of using slot_info.duration * Don't rely on sub implementation for Instant * Apply PR suggestions * Use saturating_duration_since Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Marcin S. <marcin@bytedude.com> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -692,14 +692,16 @@ mod tests {
|
||||
slot += 1;
|
||||
};
|
||||
|
||||
let inherent_data = (
|
||||
sp_timestamp::InherentDataProvider::new(
|
||||
std::time::Duration::from_millis(SLOT_DURATION * slot).into(),
|
||||
),
|
||||
sp_consensus_babe::inherents::InherentDataProvider::new(slot.into()),
|
||||
let inherent_data = futures::executor::block_on(
|
||||
(
|
||||
sp_timestamp::InherentDataProvider::new(
|
||||
std::time::Duration::from_millis(SLOT_DURATION * slot).into(),
|
||||
),
|
||||
sp_consensus_babe::inherents::InherentDataProvider::new(slot.into()),
|
||||
)
|
||||
.create_inherent_data(),
|
||||
)
|
||||
.create_inherent_data()
|
||||
.expect("Creates inherent data");
|
||||
.expect("Creates inherent data");
|
||||
|
||||
digest.push(<DigestItem as CompatibleDigestItem>::babe_pre_digest(babe_pre_digest));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user