We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faa93c0 commit afa021eCopy full SHA for afa021e
x/btcbridge/types/msg_initiate_dkg.go
@@ -18,6 +18,8 @@ func (m *MsgInitiateDKG) ValidateBasic() error {
18
return ErrInvalidDKGParams
19
}
20
21
+ participants := make(map[string]bool)
22
+
23
for _, p := range m.Participants {
24
if len(p.Moniker) > stakingtypes.MaxMonikerLength {
25
@@ -30,6 +32,12 @@ func (m *MsgInitiateDKG) ValidateBasic() error {
30
32
if _, err := sdk.ConsAddressFromHex(p.ConsensusAddress); err != nil {
31
33
return errorsmod.Wrap(err, "invalid consensus address")
34
35
36
+ if participants[p.ConsensusAddress] {
37
+ return errorsmod.Wrap(ErrInvalidDKGParams, "duplicate participant")
38
+ }
39
40
+ participants[p.ConsensusAddress] = true
41
42
43
if len(m.VaultTypes) == 0 {
0 commit comments