mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 13:57:58 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user