From 41348affc4047870d976eb8d2e26863b01745eee Mon Sep 17 00:00:00 2001 From: Fabien Penso Date: Mon, 22 Apr 2024 19:01:11 +0200 Subject: [PATCH] fix(ics04): packet receive event type identifier (#1179) * fix: ics04 packet event name * Add Changelog * Fix Changelog * nit on const decl group * nits on changelog entry * Add link to ibc-go channel events --------- Co-authored-by: Ranadeep Biswas Co-authored-by: Sean Chen --- .../bug-fixes/1179-fix-packet-attribute-name.md | 2 ++ ibc-core/ics04-channel/types/src/events/mod.rs | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changelog/unreleased/bug-fixes/1179-fix-packet-attribute-name.md diff --git a/.changelog/unreleased/bug-fixes/1179-fix-packet-attribute-name.md b/.changelog/unreleased/bug-fixes/1179-fix-packet-attribute-name.md new file mode 100644 index 000000000..3040ade5d --- /dev/null +++ b/.changelog/unreleased/bug-fixes/1179-fix-packet-attribute-name.md @@ -0,0 +1,2 @@ +- [ibc-core-channel-types] Make receive packet event type identifier consistent + with `ibc-go`. ([\#1180](https://github.com/cosmos/ibc-rs/issues/1180)) diff --git a/ibc-core/ics04-channel/types/src/events/mod.rs b/ibc-core/ics04-channel/types/src/events/mod.rs index 3fee6bb6e..443119b3e 100644 --- a/ibc-core/ics04-channel/types/src/events/mod.rs +++ b/ibc-core/ics04-channel/types/src/events/mod.rs @@ -25,20 +25,22 @@ use super::Version; use crate::error::ChannelError; use crate::packet::Packet; -/// Channel event types +/// Channel event types corresponding to ibc-go's channel events: +/// https://github.com/cosmos/ibc-go/blob/c4413c5877f9ef883494da1721cb18caaba7f7f5/modules/core/04-channel/types/events.go#L52-L72 const CHANNEL_OPEN_INIT_EVENT: &str = "channel_open_init"; const CHANNEL_OPEN_TRY_EVENT: &str = "channel_open_try"; const CHANNEL_OPEN_ACK_EVENT: &str = "channel_open_ack"; const CHANNEL_OPEN_CONFIRM_EVENT: &str = "channel_open_confirm"; const CHANNEL_CLOSE_INIT_EVENT: &str = "channel_close_init"; const CHANNEL_CLOSE_CONFIRM_EVENT: &str = "channel_close_confirm"; +const CHANNEL_CLOSED_EVENT: &str = "channel_close"; + /// Packet event types const SEND_PACKET_EVENT: &str = "send_packet"; -const RECEIVE_PACKET_EVENT: &str = "receive_packet"; +const RECEIVE_PACKET_EVENT: &str = "recv_packet"; const WRITE_ACK_EVENT: &str = "write_acknowledgement"; const ACK_PACKET_EVENT: &str = "acknowledge_packet"; const TIMEOUT_EVENT: &str = "timeout_packet"; -const CHANNEL_CLOSED_EVENT: &str = "channel_close"; #[cfg_attr( feature = "parity-scale-codec",