Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Make RollingFinality::remove_signers more tolerant.
Browse files Browse the repository at this point in the history
  • Loading branch information
afck committed Aug 15, 2019
1 parent fc24665 commit cf42ebb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ethcore/src/engines/authority_round/finality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ impl RollingFinality {
match self.sign_count.entry(*signer) {
Entry::Occupied(mut entry) => {
// decrement count for this signer and purge on zero.
*entry.get_mut() -= 1;

if *entry.get() == 0 {
if *entry.get() <= 1 {
entry.remove();
} else {
*entry.get_mut() -= 1;
}
}
Entry::Vacant(_) => {
Expand Down

0 comments on commit cf42ebb

Please sign in to comment.