Skip to content

Commit 14c2698

Browse files
authored
nit: rename update param messages to match other modules. (#3708)
1 parent 6f628d9 commit 14c2698

File tree

7 files changed

+131
-130
lines changed

7 files changed

+131
-130
lines changed

modules/core/02-client/types/codec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
4646
&MsgUpdateClient{},
4747
&MsgUpgradeClient{},
4848
&MsgSubmitMisbehaviour{},
49-
&MsgUpdateClientParams{},
49+
&MsgUpdateParams{},
5050
)
5151

5252
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)

modules/core/02-client/types/msgs.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var (
1515
_ sdk.Msg = (*MsgUpdateClient)(nil)
1616
_ sdk.Msg = (*MsgSubmitMisbehaviour)(nil)
1717
_ sdk.Msg = (*MsgUpgradeClient)(nil)
18-
_ sdk.Msg = (*MsgUpdateClientParams)(nil)
18+
_ sdk.Msg = (*MsgUpdateParams)(nil)
1919

2020
_ codectypes.UnpackInterfacesMessage = (*MsgCreateClient)(nil)
2121
_ codectypes.UnpackInterfacesMessage = (*MsgUpdateClient)(nil)
@@ -266,25 +266,25 @@ func (msg MsgSubmitMisbehaviour) UnpackInterfaces(unpacker codectypes.AnyUnpacke
266266
return unpacker.UnpackAny(msg.Misbehaviour, &misbehaviour)
267267
}
268268

269-
// NewMsgUpdateClientParams creates a new instance of MsgUpdateClientParams.
270-
func NewMsgUpdateClientParams(authority string, params Params) *MsgUpdateClientParams {
271-
return &MsgUpdateClientParams{
269+
// NewMsgUpdateParams creates a new instance of MsgUpdateParams.
270+
func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams {
271+
return &MsgUpdateParams{
272272
Authority: authority,
273273
Params: params,
274274
}
275275
}
276276

277-
// GetSigners returns the expected signers for a MsgUpdateClientParams message.
278-
func (msg *MsgUpdateClientParams) GetSigners() []sdk.AccAddress {
277+
// GetSigners returns the expected signers for a MsgUpdateParams message.
278+
func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress {
279279
accAddr, err := sdk.AccAddressFromBech32(msg.Authority)
280280
if err != nil {
281281
panic(err)
282282
}
283283
return []sdk.AccAddress{accAddr}
284284
}
285285

286-
// ValidateBasic performs basic checks on a MsgUpdateClientParams.
287-
func (msg *MsgUpdateClientParams) ValidateBasic() error {
286+
// ValidateBasic performs basic checks on a MsgUpdateParams.
287+
func (msg *MsgUpdateParams) ValidateBasic() error {
288288
if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil {
289289
return errorsmod.Wrapf(ibcerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err)
290290
}

modules/core/02-client/types/msgs_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -610,32 +610,32 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() {
610610
}
611611
}
612612

613-
// TestMsgUpdateClientParams_ValidateBasic tests ValidateBasic for MsgUpdateClientParams
614-
func (suite *TypesTestSuite) TestMsgUpdateClientParams_ValidateBasic() {
613+
// TestMsgUpdateParams_ValidateBasic tests ValidateBasic for MsgUpdateParams
614+
func (suite *TypesTestSuite) TestMsgUpdateParams_ValidateBasic() {
615615
authority := suite.chainA.App.GetIBCKeeper().GetAuthority()
616616
testCases := []struct {
617617
name string
618-
msg *types.MsgUpdateClientParams
618+
msg *types.MsgUpdateParams
619619
expPass bool
620620
}{
621621
{
622622
"success: valid authority and params",
623-
types.NewMsgUpdateClientParams(authority, types.DefaultParams()),
623+
types.NewMsgUpdateParams(authority, types.DefaultParams()),
624624
true,
625625
},
626626
{
627627
"success: valid authority empty params",
628-
types.NewMsgUpdateClientParams(authority, types.Params{}),
628+
types.NewMsgUpdateParams(authority, types.Params{}),
629629
true,
630630
},
631631
{
632632
"failure: invalid authority address",
633-
types.NewMsgUpdateClientParams("invalid", types.DefaultParams()),
633+
types.NewMsgUpdateParams("invalid", types.DefaultParams()),
634634
false,
635635
},
636636
{
637637
"failure: invalid allowed client",
638-
types.NewMsgUpdateClientParams(authority, types.NewParams("")),
638+
types.NewMsgUpdateParams(authority, types.NewParams("")),
639639
false,
640640
},
641641
}

0 commit comments

Comments
 (0)