diff --git a/modules/core/04-channel/keeper/events.go b/modules/core/04-channel/keeper/events.go index ff277a463bd..44d9c75d941 100644 --- a/modules/core/04-channel/keeper/events.go +++ b/modules/core/04-channel/keeper/events.go @@ -387,7 +387,8 @@ func EmitChannelUpgradeTimeoutEvent(ctx sdk.Context, portID string, channelID st sdk.NewAttribute(types.AttributeKeyUpgradeConnectionHops, upgrade.Fields.ConnectionHops[0]), sdk.NewAttribute(types.AttributeKeyUpgradeVersion, upgrade.Fields.Version), sdk.NewAttribute(types.AttributeKeyUpgradeOrdering, upgrade.Fields.Ordering.String()), - sdk.NewAttribute(types.AttributeKeyUpgradeTimeout, upgrade.Timeout.String()), + sdk.NewAttribute(types.AttributeKeyUpgradeTimeoutHeight, upgrade.Timeout.Height.String()), + sdk.NewAttribute(types.AttributeKeyUpgradeTimeoutTimestamp, fmt.Sprintf("%d", upgrade.Timeout.Timestamp)), sdk.NewAttribute(types.AttributeKeyUpgradeSequence, fmt.Sprintf("%d", currentChannel.UpgradeSequence)), ), sdk.NewEvent( diff --git a/modules/core/04-channel/types/events.go b/modules/core/04-channel/types/events.go index 414a02208e5..92ed9094022 100644 --- a/modules/core/04-channel/types/events.go +++ b/modules/core/04-channel/types/events.go @@ -40,12 +40,13 @@ const ( AttributeKeyConnection = "packet_connection" // upgrade specific keys - AttributeKeyUpgradeSequence = "upgrade_sequence" - AttributeKeyUpgradeVersion = "upgrade_version" - AttributeKeyUpgradeConnectionHops = "upgrade_connection_hops" - AttributeKeyUpgradeOrdering = "upgrade_ordering" - AttributeKeyUpgradeErrorReceipt = "upgrade_error_receipt" - AttributeKeyUpgradeTimeout = "upgrade_timeout" + AttributeKeyUpgradeSequence = "upgrade_sequence" + AttributeKeyUpgradeVersion = "upgrade_version" + AttributeKeyUpgradeConnectionHops = "upgrade_connection_hops" + AttributeKeyUpgradeOrdering = "upgrade_ordering" + AttributeKeyUpgradeErrorReceipt = "upgrade_error_receipt" + AttributeKeyUpgradeTimeoutHeight = "upgrade_timeout_height" + AttributeKeyUpgradeTimeoutTimestamp = "upgrade_timeout_timestamp" ) // IBC channel events vars diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index 5b647181fe8..5bfa30c0a87 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -2309,15 +2309,16 @@ func (suite *KeeperTestSuite) TestChannelUpgradeTimeout() { timeout := channeltypes.NewTimeout(clienttypes.ZeroHeight(), 1) expEvents := ibctesting.EventsMap{ channeltypes.EventTypeChannelUpgradeTimeout: { - channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, - channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, - channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, - channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, - channeltypes.AttributeKeyUpgradeConnectionHops: proposedUpgrade.Fields.ConnectionHops[0], - channeltypes.AttributeKeyUpgradeVersion: proposedUpgrade.Fields.Version, - channeltypes.AttributeKeyUpgradeOrdering: proposedUpgrade.Fields.Ordering.String(), - channeltypes.AttributeKeyUpgradeTimeout: timeout.String(), - channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), + channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID, + channeltypes.AttributeKeyChannelID: path.EndpointA.ChannelID, + channeltypes.AttributeCounterpartyPortID: path.EndpointB.ChannelConfig.PortID, + channeltypes.AttributeCounterpartyChannelID: path.EndpointB.ChannelID, + channeltypes.AttributeKeyUpgradeConnectionHops: proposedUpgrade.Fields.ConnectionHops[0], + channeltypes.AttributeKeyUpgradeVersion: proposedUpgrade.Fields.Version, + channeltypes.AttributeKeyUpgradeOrdering: proposedUpgrade.Fields.Ordering.String(), + channeltypes.AttributeKeyUpgradeTimeoutHeight: timeout.Height.String(), + channeltypes.AttributeKeyUpgradeTimeoutTimestamp: fmt.Sprintf("%d", timeout.Timestamp), + channeltypes.AttributeKeyUpgradeSequence: fmt.Sprintf("%d", channel.UpgradeSequence), }, channeltypes.EventTypeChannelUpgradeError: { channeltypes.AttributeKeyPortID: path.EndpointA.ChannelConfig.PortID,