Skip to content

Commit

Permalink
simplify condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardmack committed Jul 8, 2022
1 parent 653d730 commit a73d3c9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/grandpa/message_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,8 @@ func getEquivocatoryVoters(votes []AuthData) map[ed25519.PublicKeyBytes]struct{}

for _, v := range votes {
signature, present := voters[v.AuthorityID]
if present {
if !bytes.Equal(signature[:], v.Signature[:]) {
eqvVoters[v.AuthorityID] = struct{}{}
}
if present && !bytes.Equal(signature[:], v.Signature[:]) {
eqvVoters[v.AuthorityID] = struct{}{}
} else {
voters[v.AuthorityID] = v.Signature
}
Expand Down

0 comments on commit a73d3c9

Please sign in to comment.