Skip to content

Commit

Permalink
Mend counterparty state check inside ChanOpenConfirm handler (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani authored Feb 6, 2023
1 parent 1fb3547 commit 059fc1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/396-fix-chan-open-confirm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Mend `ChanOpenConfirm` handler check of expected counterparty state
([#396](https://github.com/cosmos/ibc-rs/issues/396))
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
Expand Down Expand Up @@ -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(),
);
Expand Down

0 comments on commit 059fc1a

Please sign in to comment.