diff --git a/.changelog/unreleased/bug-fixes/396-fix-chan-open-confirm.md b/.changelog/unreleased/bug-fixes/396-fix-chan-open-confirm.md new file mode 100644 index 000000000..b774380c0 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/396-fix-chan-open-confirm.md @@ -0,0 +1,2 @@ +- Mend `ChanOpenConfirm` handler check of expected counterparty state + ([#396](https://github.com/cosmos/ibc-rs/issues/396)) \ No newline at end of file diff --git a/crates/ibc/src/core/ics04_channel/handler/chan_open_confirm.rs b/crates/ibc/src/core/ics04_channel/handler/chan_open_confirm.rs index 3207957d2..34f0c9e18 100644 --- a/crates/ibc/src/core/ics04_channel/handler/chan_open_confirm.rs +++ b/crates/ibc/src/core/ics04_channel/handler/chan_open_confirm.rs @@ -79,7 +79,7 @@ pub(crate) mod val_exec_ctx { let expected_chan_end_on_a = ChannelEnd::new( State::Open, *chan_end_on_b.ordering(), - Counterparty::new(msg.port_id_on_b.clone(), None), + Counterparty::new(msg.port_id_on_b.clone(), Some(msg.chan_id_on_b.clone())), vec![conn_id_on_a.clone()], chan_end_on_b.version.clone(), ); @@ -165,7 +165,7 @@ pub(crate) fn process<Ctx: ChannelReader>( let expected_chan_end_on_a = ChannelEnd::new( State::Open, *chan_end_on_b.ordering(), - Counterparty::new(msg.port_id_on_b.clone(), None), + Counterparty::new(msg.port_id_on_b.clone(), Some(msg.chan_id_on_b.clone())), vec![conn_id_on_a.clone()], chan_end_on_b.version.clone(), );