Skip to content
Snippets Groups Projects
Commit 186efbc2 authored by Web3 Philosopher's avatar Web3 Philosopher Committed by GitHub
Browse files

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: default avatarBastian Köcher <bkchr@users.noreply.github.com>

* Update client/beefy/src/round.rs

* Update client/beefy/src/round.rs

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

* remove stray semi

Co-authored-by: default avatarBastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: default avatarAndreas Doerr <adoerr@users.noreply.github.com>
parent 506ca48d
Branches
No related merge requests found
......@@ -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 {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment