mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-18 18:45:41 +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:
@@ -203,6 +203,7 @@ where
|
||||
|
||||
let mut inherent_data = create_inherent_data_providers
|
||||
.create_inherent_data()
|
||||
.await
|
||||
.map_err(Error::<B>::Inherent)?;
|
||||
|
||||
let slot_now = create_inherent_data_providers.slot();
|
||||
|
||||
@@ -216,7 +216,7 @@ where
|
||||
PF::Proposer: Proposer<B, Error = Error, Transaction = sp_api::TransactionFor<C, B>>,
|
||||
SO: SyncOracle + Send + Sync + Clone,
|
||||
L: sc_consensus::JustificationSyncLink<B>,
|
||||
CIDP: CreateInherentDataProviders<B, ()> + Send,
|
||||
CIDP: CreateInherentDataProviders<B, ()> + Send + 'static,
|
||||
CIDP::InherentDataProviders: InherentDataProviderExt + Send,
|
||||
BS: BackoffAuthoringBlocksStrategy<NumberFor<B>> + Send + Sync + 'static,
|
||||
Error: std::error::Error + Send + From<sp_consensus::Error> + 'static,
|
||||
@@ -960,7 +960,7 @@ mod tests {
|
||||
let res = executor::block_on(worker.on_slot(SlotInfo {
|
||||
slot: 0.into(),
|
||||
ends_at: Instant::now() + Duration::from_secs(100),
|
||||
inherent_data: InherentData::new(),
|
||||
create_inherent_data: Box::new(()),
|
||||
duration: Duration::from_millis(1000),
|
||||
chain_head: head,
|
||||
block_size_limit: None,
|
||||
|
||||
Reference in New Issue
Block a user