Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Bastian Köcher <[email protected]>
  • Loading branch information
acatangiu and bkchr authored Nov 25, 2022
commit a03f5c0a713947004e299de28f67b14052cc3dbb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ impl<B: Block> OnDemandJustificationsEngine<B> {

fn request_from_peer(&mut self, peer: PeerId, req_info: RequestInfo<B>) {
debug!(
target: "beefy::sync", "🥩 requesting justif #{:?} from peer {:?}",
req_info.block, peer
target: "beefy::sync",
"🥩 requesting justif #{:?} from peer {:?}",
req_info.block,
peer,
);

let payload = JustificationRequest::<B> { begin: req_info.block }.encode();
Expand Down
6 changes: 1 addition & 5 deletions client/beefy/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,7 @@ where
self.finalize(finality_proof)?;
} else {
let mandatory_round =
if let Some((number, _)) = self.voting_oracle().mandatory_pending() {
number == round.1
} else {
false
};
self.voting_oracle().mandatory_pending().map(|p| p.0 == round.1).unwrap_or(false);
// Persist state after handling self vote to avoid double voting in case
// of voter restarts.
// Also persist state after handling mandatory block vote.
Expand Down