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",