Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gitferry committed Jul 5, 2022
1 parent e7e8e51 commit d78df0f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions x/checkpointing/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
// Register messages
registry.RegisterImplementations((*sdk.Msg)(nil),
&MsgAddBlsSig{},
&MsgWrappedCreateValidator{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}
Expand Down
21 changes: 21 additions & 0 deletions x/checkpointing/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,24 @@ func (m *MsgAddBlsSig) GetSigners() []sdk.AccAddress {

return []sdk.AccAddress{signer}
}

func (m *MsgWrappedCreateValidator) ValidateBasic() error {
// This function validates stateless message elements
_, err := sdk.AccAddressFromBech32(m.Pubkey.Address)
if err != nil {
return err
}

// TODO: verify bls sig

return nil
}

func (m *MsgWrappedCreateValidator) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(m.Pubkey.Address)
if err != nil {
panic(err)
}

return []sdk.AccAddress{signer}
}

0 comments on commit d78df0f

Please sign in to comment.