Skip to content

Commit

Permalink
improve: use bytes.Equal to compare bls pubkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBSC committed Jul 24, 2023
1 parent 7456122 commit bdf86f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/vote/vote_signer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package vote

import (
"bytes"
"context"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -106,5 +107,5 @@ func (signer *VoteSigner) SignVote(vote *types.VoteEnvelope) error {
}

func (signer *VoteSigner) UsingKey(bLSPublicKey *types.BLSPublicKey) bool {
return types.BLSPublicKey(signer.pubKey) == *bLSPublicKey
return bytes.Equal(signer.pubKey[:], bLSPublicKey[:])
}

0 comments on commit bdf86f2

Please sign in to comment.