Skip to content

Commit

Permalink
improve participant check
Browse files Browse the repository at this point in the history
  • Loading branch information
keithsue committed Jan 24, 2025
1 parent 5e02325 commit fec9265
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/btcbridge/types/tss.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/binary"
"encoding/hex"
"reflect"
"strings"

"github.com/cometbft/cometbft/crypto"
"github.com/cometbft/cometbft/crypto/tmhash"
Expand All @@ -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
}
}
Expand Down

0 comments on commit fec9265

Please sign in to comment.