From 5b32d0853e06f3d834b8cc691463f6ca87388a4d Mon Sep 17 00:00:00 2001 From: NathanBSC Date: Mon, 24 Jul 2023 20:58:45 +0800 Subject: [PATCH] use bytes.Equal to compare bls pubkeys --- core/vote/vote_signer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/vote/vote_signer.go b/core/vote/vote_signer.go index 03d89d53c7..c2cda513f0 100644 --- a/core/vote/vote_signer.go +++ b/core/vote/vote_signer.go @@ -1,6 +1,7 @@ package vote import ( + "bytes" "context" "fmt" "io/ioutil" @@ -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[:]) }