Check if BEEFY authority is in current set (#10281)

* check if BEEFY authority is in current set

* Update client/beefy/src/round.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update client/beefy/src/round.rs

* Update client/beefy/src/round.rs

Co-authored-by: Andreas Doerr <adoerr@users.noreply.github.com>

* remove stray semi

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Andreas Doerr <adoerr@users.noreply.github.com>
This commit is contained in:
Seun Lanlege
2021-11-17 13:46:10 +01:00
committed by GitHub
parent 506ca48dc8
commit 186efbc2a5
+5 -1
View File
@@ -82,7 +82,11 @@ where
}
pub(crate) fn add_vote(&mut self, round: (H, N), vote: (Public, Signature)) -> bool {
self.rounds.entry(round).or_default().add_vote(vote)
if self.validator_set.validators.iter().any(|id| vote.0 == *id) {
self.rounds.entry(round).or_default().add_vote(vote)
} else {
false
}
}
pub(crate) fn is_done(&self, round: &(H, N)) -> bool {