From fec9265928f0262e308eec9d3446a990e125ae0a Mon Sep 17 00:00:00 2001 From: keithsue Date: Fri, 24 Jan 2025 13:06:26 +0800 Subject: [PATCH] improve participant check --- x/btcbridge/types/tss.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/btcbridge/types/tss.go b/x/btcbridge/types/tss.go index f72a9a1..0bbf751 100644 --- a/x/btcbridge/types/tss.go +++ b/x/btcbridge/types/tss.go @@ -6,6 +6,7 @@ import ( "encoding/binary" "encoding/hex" "reflect" + "strings" "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/tmhash" @@ -25,7 +26,7 @@ func MustGetConsensusAddr(consPubKey string) string { // ParticipantExists returns true if the given address is a participant, false otherwise func ParticipantExists(participants []*DKGParticipant, consAddress string) bool { for _, p := range participants { - if MustGetConsensusAddr(p.ConsensusPubkey) == consAddress { + if MustGetConsensusAddr(p.ConsensusPubkey) == strings.ToLower(consAddress) { return true } }