mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 14:31:13 +00:00
Refactory of next_slot method (#13155)
Refactory of `next_slot` method * Prevents slot worker exit if inherent data provider creation fails * Failure is not possible anymore * Fix potential failure after warp-sync where block headers of not already downloaded blocks are used by the inherent data provider
This commit is contained in:
@@ -524,13 +524,7 @@ pub async fn start_slot_worker<B, C, W, SO, CIDP, Proof>(
|
||||
let mut slots = Slots::new(slot_duration.as_duration(), create_inherent_data_providers, client);
|
||||
|
||||
loop {
|
||||
let slot_info = match slots.next_slot().await {
|
||||
Ok(r) => r,
|
||||
Err(e) => {
|
||||
warn!(target: LOG_TARGET, "Error while polling for next slot: {}", e);
|
||||
return
|
||||
},
|
||||
};
|
||||
let slot_info = slots.next_slot().await;
|
||||
|
||||
if sync_oracle.is_major_syncing() {
|
||||
debug!(target: LOG_TARGET, "Skipping proposal slot due to sync.");
|
||||
|
||||
Reference in New Issue
Block a user