Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove Type(), Route(), GetSignBytes() (removed from sdk.Msg interface) #161

Merged
merged 3 commits into from
May 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking

* (modules/core) [\#161](https://github.com/cosmos/ibc-go/pull/161) Remove Type(), Route(), GetSignBytes() from 02-client, 03-connection, and 04-channel messages.
* (modules) [\#140](https://github.com/cosmos/ibc-go/pull/140) IsFrozen() client state interface changed to Status(). gRPC `ClientStatus` route added.
* (modules/core) [\#109](https://github.com/cosmos/ibc-go/pull/109) Remove connection and channel handshake CLI commands.
* (modules) [\#107](https://github.com/cosmos/ibc-go/pull/107) Modify OnRecvPacket callback to return an acknowledgement which indicates if it is successful or not. Callback state changes are discarded for unsuccessful acknowledgements only.
62 changes: 0 additions & 62 deletions modules/core/02-client/types/msgs.go
Original file line number Diff line number Diff line change
@@ -51,16 +51,6 @@ func NewMsgCreateClient(
}, nil
}

// Route implements sdk.Msg
func (msg MsgCreateClient) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgCreateClient) Type() string {
return TypeMsgCreateClient
}

// ValidateBasic implements sdk.Msg
func (msg MsgCreateClient) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -90,12 +80,6 @@ func (msg MsgCreateClient) ValidateBasic() error {
return consensusState.ValidateBasic()
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgCreateClient) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgCreateClient) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -132,16 +116,6 @@ func NewMsgUpdateClient(id string, header exported.Header, signer string) (*MsgU
}, nil
}

// Route implements sdk.Msg
func (msg MsgUpdateClient) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgUpdateClient) Type() string {
return TypeMsgUpdateClient
}

// ValidateBasic implements sdk.Msg
func (msg MsgUpdateClient) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -161,12 +135,6 @@ func (msg MsgUpdateClient) ValidateBasic() error {
return host.ClientIdentifierValidator(msg.ClientId)
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgUpdateClient) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgUpdateClient) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -205,16 +173,6 @@ func NewMsgUpgradeClient(clientID string, clientState exported.ClientState, cons
}, nil
}

// Route implements sdk.Msg
func (msg MsgUpgradeClient) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgUpgradeClient) Type() string {
return TypeMsgUpgradeClient
}

// ValidateBasic implements sdk.Msg
func (msg MsgUpgradeClient) ValidateBasic() error {
// will not validate client state as committed client may not form a valid client state.
@@ -247,12 +205,6 @@ func (msg MsgUpgradeClient) ValidateBasic() error {
return host.ClientIdentifierValidator(msg.ClientId)
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgUpgradeClient) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgUpgradeClient) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -289,14 +241,6 @@ func NewMsgSubmitMisbehaviour(clientID string, misbehaviour exported.Misbehaviou
}, nil
}

// Route returns the MsgSubmitClientMisbehaviour's route.
func (msg MsgSubmitMisbehaviour) Route() string { return host.RouterKey }

// Type returns the MsgSubmitMisbehaviour's type.
func (msg MsgSubmitMisbehaviour) Type() string {
return TypeMsgSubmitMisbehaviour
}

// ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitMisbehaviour.
func (msg MsgSubmitMisbehaviour) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -321,12 +265,6 @@ func (msg MsgSubmitMisbehaviour) ValidateBasic() error {
return host.ClientIdentifierValidator(msg.ClientId)
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgSubmitMisbehaviour) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners returns the single expected signer for a MsgSubmitMisbehaviour.
func (msg MsgSubmitMisbehaviour) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
8 changes: 4 additions & 4 deletions modules/core/03-connection/types/events.go
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@ const (

// IBC connection events vars
var (
EventTypeConnectionOpenInit = MsgConnectionOpenInit{}.Type()
EventTypeConnectionOpenTry = MsgConnectionOpenTry{}.Type()
EventTypeConnectionOpenAck = MsgConnectionOpenAck{}.Type()
EventTypeConnectionOpenConfirm = MsgConnectionOpenConfirm{}.Type()
EventTypeConnectionOpenInit = "connection_open_init"
EventTypeConnectionOpenTry = "connection_open_try"
EventTypeConnectionOpenAck = "connection_open_ack"
EventTypeConnectionOpenConfirm = "connection_open_confirm"

AttributeValueCategory = fmt.Sprintf("%s_%s", host.ModuleName, SubModuleName)
)
64 changes: 0 additions & 64 deletions modules/core/03-connection/types/msgs.go
Original file line number Diff line number Diff line change
@@ -39,16 +39,6 @@ func NewMsgConnectionOpenInit(
}
}

// Route implements sdk.Msg
func (msg MsgConnectionOpenInit) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgConnectionOpenInit) Type() string {
return "connection_open_init"
}

// ValidateBasic implements sdk.Msg.
func (msg MsgConnectionOpenInit) ValidateBasic() error {
if err := host.ClientIdentifierValidator(msg.ClientId); err != nil {
@@ -71,12 +61,6 @@ func (msg MsgConnectionOpenInit) ValidateBasic() error {
return msg.Counterparty.ValidateBasic()
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgConnectionOpenInit) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgConnectionOpenInit) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -114,16 +98,6 @@ func NewMsgConnectionOpenTry(
}
}

// Route implements sdk.Msg
func (msg MsgConnectionOpenTry) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgConnectionOpenTry) Type() string {
return "connection_open_try"
}

// ValidateBasic implements sdk.Msg
func (msg MsgConnectionOpenTry) ValidateBasic() error {
// an empty connection identifier indicates that a connection identifier should be generated
@@ -184,12 +158,6 @@ func (msg MsgConnectionOpenTry) UnpackInterfaces(unpacker codectypes.AnyUnpacker
return unpacker.UnpackAny(msg.ClientState, new(exported.ClientState))
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgConnectionOpenTry) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgConnectionOpenTry) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -228,16 +196,6 @@ func (msg MsgConnectionOpenAck) UnpackInterfaces(unpacker codectypes.AnyUnpacker
return unpacker.UnpackAny(msg.ClientState, new(exported.ClientState))
}

// Route implements sdk.Msg
func (msg MsgConnectionOpenAck) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgConnectionOpenAck) Type() string {
return "connection_open_ack"
}

// ValidateBasic implements sdk.Msg
func (msg MsgConnectionOpenAck) ValidateBasic() error {
if !IsValidConnectionID(msg.ConnectionId) {
@@ -281,12 +239,6 @@ func (msg MsgConnectionOpenAck) ValidateBasic() error {
return nil
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgConnectionOpenAck) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgConnectionOpenAck) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -310,16 +262,6 @@ func NewMsgConnectionOpenConfirm(
}
}

// Route implements sdk.Msg
func (msg MsgConnectionOpenConfirm) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgConnectionOpenConfirm) Type() string {
return "connection_open_confirm"
}

// ValidateBasic implements sdk.Msg
func (msg MsgConnectionOpenConfirm) ValidateBasic() error {
if !IsValidConnectionID(msg.ConnectionId) {
@@ -338,12 +280,6 @@ func (msg MsgConnectionOpenConfirm) ValidateBasic() error {
return nil
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgConnectionOpenConfirm) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgConnectionOpenConfirm) GetSigners() []sdk.AccAddress {
accAddr, err := sdk.AccAddressFromBech32(msg.Signer)
23 changes: 12 additions & 11 deletions modules/core/04-channel/types/events.go
Original file line number Diff line number Diff line change
@@ -14,11 +14,12 @@ const (
AttributeCounterpartyPortID = "counterparty_port_id"
AttributeCounterpartyChannelID = "counterparty_channel_id"

EventTypeSendPacket = "send_packet"
EventTypeRecvPacket = "recv_packet"
EventTypeWriteAck = "write_acknowledgement"
EventTypeAcknowledgePacket = "acknowledge_packet"
EventTypeTimeoutPacket = "timeout_packet"
EventTypeSendPacket = "send_packet"
EventTypeRecvPacket = "recv_packet"
EventTypeWriteAck = "write_acknowledgement"
EventTypeAcknowledgePacket = "acknowledge_packet"
EventTypeTimeoutPacket = "timeout_packet"
EventTypeTimeoutPacketOnClose = "timeout_on_close_packet"

// NOTE: DEPRECATED in favor of AttributeKeyDataHex
AttributeKeyData = "packet_data"
@@ -38,12 +39,12 @@ const (

// IBC channel events vars
var (
EventTypeChannelOpenInit = MsgChannelOpenInit{}.Type()
EventTypeChannelOpenTry = MsgChannelOpenTry{}.Type()
EventTypeChannelOpenAck = MsgChannelOpenAck{}.Type()
EventTypeChannelOpenConfirm = MsgChannelOpenConfirm{}.Type()
EventTypeChannelCloseInit = MsgChannelCloseInit{}.Type()
EventTypeChannelCloseConfirm = MsgChannelCloseConfirm{}.Type()
EventTypeChannelOpenInit = "channel_open_init"
EventTypeChannelOpenTry = "channel_open_try"
EventTypeChannelOpenAck = "channel_open_ack"
EventTypeChannelOpenConfirm = "channel_open_confirm"
EventTypeChannelCloseInit = "channel_close_init"
EventTypeChannelCloseConfirm = "channel_close_confirm"

AttributeValueCategory = fmt.Sprintf("%s_%s", host.ModuleName, SubModuleName)
)
160 changes: 0 additions & 160 deletions modules/core/04-channel/types/msgs.go
Original file line number Diff line number Diff line change
@@ -28,16 +28,6 @@ func NewMsgChannelOpenInit(
}
}

// Route implements sdk.Msg
func (msg MsgChannelOpenInit) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgChannelOpenInit) Type() string {
return "channel_open_init"
}

// ValidateBasic implements sdk.Msg
func (msg MsgChannelOpenInit) ValidateBasic() error {
if err := host.PortIdentifierValidator(msg.PortId); err != nil {
@@ -59,12 +49,6 @@ func (msg MsgChannelOpenInit) ValidateBasic() error {
return msg.Channel.ValidateBasic()
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgChannelOpenInit) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgChannelOpenInit) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -96,16 +80,6 @@ func NewMsgChannelOpenTry(
}
}

// Route implements sdk.Msg
func (msg MsgChannelOpenTry) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgChannelOpenTry) Type() string {
return "channel_open_try"
}

// ValidateBasic implements sdk.Msg
func (msg MsgChannelOpenTry) ValidateBasic() error {
if err := host.PortIdentifierValidator(msg.PortId); err != nil {
@@ -140,12 +114,6 @@ func (msg MsgChannelOpenTry) ValidateBasic() error {
return msg.Channel.ValidateBasic()
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgChannelOpenTry) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgChannelOpenTry) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -174,16 +142,6 @@ func NewMsgChannelOpenAck(
}
}

// Route implements sdk.Msg
func (msg MsgChannelOpenAck) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgChannelOpenAck) Type() string {
return "channel_open_ack"
}

// ValidateBasic implements sdk.Msg
func (msg MsgChannelOpenAck) ValidateBasic() error {
if err := host.PortIdentifierValidator(msg.PortId); err != nil {
@@ -208,12 +166,6 @@ func (msg MsgChannelOpenAck) ValidateBasic() error {
return nil
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgChannelOpenAck) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgChannelOpenAck) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -240,16 +192,6 @@ func NewMsgChannelOpenConfirm(
}
}

// Route implements sdk.Msg
func (msg MsgChannelOpenConfirm) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgChannelOpenConfirm) Type() string {
return "channel_open_confirm"
}

// ValidateBasic implements sdk.Msg
func (msg MsgChannelOpenConfirm) ValidateBasic() error {
if err := host.PortIdentifierValidator(msg.PortId); err != nil {
@@ -271,12 +213,6 @@ func (msg MsgChannelOpenConfirm) ValidateBasic() error {
return nil
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgChannelOpenConfirm) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgChannelOpenConfirm) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -300,16 +236,6 @@ func NewMsgChannelCloseInit(
}
}

// Route implements sdk.Msg
func (msg MsgChannelCloseInit) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgChannelCloseInit) Type() string {
return "channel_close_init"
}

// ValidateBasic implements sdk.Msg
func (msg MsgChannelCloseInit) ValidateBasic() error {
if err := host.PortIdentifierValidator(msg.PortId); err != nil {
@@ -325,12 +251,6 @@ func (msg MsgChannelCloseInit) ValidateBasic() error {
return nil
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgChannelCloseInit) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgChannelCloseInit) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -357,16 +277,6 @@ func NewMsgChannelCloseConfirm(
}
}

// Route implements sdk.Msg
func (msg MsgChannelCloseConfirm) Route() string {
return host.RouterKey
}

// Type implements sdk.Msg
func (msg MsgChannelCloseConfirm) Type() string {
return "channel_close_confirm"
}

// ValidateBasic implements sdk.Msg
func (msg MsgChannelCloseConfirm) ValidateBasic() error {
if err := host.PortIdentifierValidator(msg.PortId); err != nil {
@@ -388,12 +298,6 @@ func (msg MsgChannelCloseConfirm) ValidateBasic() error {
return nil
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgChannelCloseConfirm) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgChannelCloseConfirm) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -419,11 +323,6 @@ func NewMsgRecvPacket(
}
}

// Route implements sdk.Msg
func (msg MsgRecvPacket) Route() string {
return host.RouterKey
}

// ValidateBasic implements sdk.Msg
func (msg MsgRecvPacket) ValidateBasic() error {
if len(msg.ProofCommitment) == 0 {
@@ -439,12 +338,6 @@ func (msg MsgRecvPacket) ValidateBasic() error {
return msg.Packet.ValidateBasic()
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgRecvPacket) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetDataSignBytes returns the base64-encoded bytes used for the
// data field when signing the packet.
func (msg MsgRecvPacket) GetDataSignBytes() []byte {
@@ -461,11 +354,6 @@ func (msg MsgRecvPacket) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{signer}
}

// Type implements sdk.Msg
func (msg MsgRecvPacket) Type() string {
return "recv_packet"
}

var _ sdk.Msg = &MsgTimeout{}

// NewMsgTimeout constructs new MsgTimeout
@@ -483,11 +371,6 @@ func NewMsgTimeout(
}
}

// Route implements sdk.Msg
func (msg MsgTimeout) Route() string {
return host.RouterKey
}

// ValidateBasic implements sdk.Msg
func (msg MsgTimeout) ValidateBasic() error {
if len(msg.ProofUnreceived) == 0 {
@@ -506,12 +389,6 @@ func (msg MsgTimeout) ValidateBasic() error {
return msg.Packet.ValidateBasic()
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgTimeout) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgTimeout) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -521,11 +398,6 @@ func (msg MsgTimeout) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{signer}
}

// Type implements sdk.Msg
func (msg MsgTimeout) Type() string {
return "timeout_packet"
}

// NewMsgTimeoutOnClose constructs new MsgTimeoutOnClose
// nolint:interfacer
func NewMsgTimeoutOnClose(
@@ -543,11 +415,6 @@ func NewMsgTimeoutOnClose(
}
}

// Route implements sdk.Msg
func (msg MsgTimeoutOnClose) Route() string {
return host.RouterKey
}

// ValidateBasic implements sdk.Msg
func (msg MsgTimeoutOnClose) ValidateBasic() error {
if msg.NextSequenceRecv == 0 {
@@ -569,12 +436,6 @@ func (msg MsgTimeoutOnClose) ValidateBasic() error {
return msg.Packet.ValidateBasic()
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgTimeoutOnClose) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgTimeoutOnClose) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -584,11 +445,6 @@ func (msg MsgTimeoutOnClose) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{signer}
}

// Type implements sdk.Msg
func (msg MsgTimeoutOnClose) Type() string {
return "timeout_on_close_packet"
}

var _ sdk.Msg = &MsgAcknowledgement{}

// NewMsgAcknowledgement constructs a new MsgAcknowledgement
@@ -608,11 +464,6 @@ func NewMsgAcknowledgement(
}
}

// Route implements sdk.Msg
func (msg MsgAcknowledgement) Route() string {
return host.RouterKey
}

// ValidateBasic implements sdk.Msg
func (msg MsgAcknowledgement) ValidateBasic() error {
if len(msg.ProofAcked) == 0 {
@@ -631,12 +482,6 @@ func (msg MsgAcknowledgement) ValidateBasic() error {
return msg.Packet.ValidateBasic()
}

// GetSignBytes implements sdk.Msg. The function will panic since it is used
// for amino transaction verification which IBC does not support.
func (msg MsgAcknowledgement) GetSignBytes() []byte {
panic("IBC messages do not support amino")
}

// GetSigners implements sdk.Msg
func (msg MsgAcknowledgement) GetSigners() []sdk.AccAddress {
signer, err := sdk.AccAddressFromBech32(msg.Signer)
@@ -645,8 +490,3 @@ func (msg MsgAcknowledgement) GetSigners() []sdk.AccAddress {
}
return []sdk.AccAddress{signer}
}

// Type implements sdk.Msg
func (msg MsgAcknowledgement) Type() string {
return "acknowledge_packet"
}
6 changes: 0 additions & 6 deletions modules/core/04-channel/types/msgs_test.go
Original file line number Diff line number Diff line change
@@ -315,12 +315,6 @@ func (suite *TypesTestSuite) TestMsgChannelCloseConfirmValidateBasic() {
}
}

func (suite *TypesTestSuite) TestMsgRecvPacketType() {
msg := types.NewMsgRecvPacket(packet, suite.proof, height, addr)

suite.Equal("recv_packet", msg.Type())
}

func (suite *TypesTestSuite) TestMsgRecvPacketValidateBasic() {
testCases := []struct {
name string
4 changes: 2 additions & 2 deletions modules/core/keeper/msg_server.go
Original file line number Diff line number Diff line change
@@ -462,7 +462,7 @@ func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacke

defer func() {
telemetry.IncrCounterWithLabels(
[]string{"tx", "msg", "ibc", msg.Type()},
[]string{"tx", "msg", "ibc", channeltypes.EventTypeRecvPacket},
1,
[]metrics.Label{
telemetry.NewLabel("source-port", msg.Packet.SourcePort),
@@ -604,7 +604,7 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn

defer func() {
telemetry.IncrCounterWithLabels(
[]string{"tx", "msg", "ibc", msg.Type()},
[]string{"tx", "msg", "ibc", channeltypes.EventTypeAcknowledgePacket},
1,
[]metrics.Label{
telemetry.NewLabel("source-port", msg.Packet.SourcePort),