Skip to content

Commit 1207934

Browse files
OAyomidesorpaas
andauthored
continue in pow loop instead of returning (paritytech#9539)
* continue in pow loop instead of returning * change other return statements, add logs * remove redundant logs * formatting fix * remove log * Add some commas to make rustfmt happy Co-authored-by: Wei Tang <[email protected]> Co-authored-by: Wei Tang <[email protected]>
1 parent 436d671 commit 1207934

File tree

1 file changed

+9
-9
lines changed
  • client/consensus/pow/src

1 file changed

+9
-9
lines changed

client/consensus/pow/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ where
560560
if sync_oracle.is_major_syncing() {
561561
debug!(target: "pow", "Skipping proposal due to sync.");
562562
worker.lock().on_major_syncing();
563-
return
563+
continue
564564
}
565565

566566
let best_header = match select_chain.best_chain().await {
@@ -572,7 +572,7 @@ where
572572
Select best chain error: {:?}",
573573
err
574574
);
575-
return
575+
continue
576576
},
577577
};
578578
let best_hash = best_header.hash();
@@ -584,11 +584,11 @@ where
584584
Probably a node update is required!",
585585
err,
586586
);
587-
return
587+
continue
588588
}
589589

590590
if worker.lock().best_hash() == Some(best_hash) {
591-
return
591+
continue
592592
}
593593

594594
// The worker is locked for the duration of the whole proposing period. Within this
@@ -603,7 +603,7 @@ where
603603
Fetch difficulty failed: {:?}",
604604
err,
605605
);
606-
return
606+
continue
607607
},
608608
};
609609

@@ -619,7 +619,7 @@ where
619619
Creating inherent data providers failed: {:?}",
620620
err,
621621
);
622-
return
622+
continue
623623
},
624624
};
625625

@@ -632,7 +632,7 @@ where
632632
Creating inherent data failed: {:?}",
633633
e,
634634
);
635-
return
635+
continue
636636
},
637637
};
638638

@@ -652,7 +652,7 @@ where
652652
Creating proposer failed: {:?}",
653653
err,
654654
);
655-
return
655+
continue
656656
},
657657
};
658658

@@ -668,7 +668,7 @@ where
668668
Creating proposal failed: {:?}",
669669
err,
670670
);
671-
return
671+
continue
672672
},
673673
};
674674

0 commit comments

Comments
 (0)