Skip to content

Commit

Permalink
passing connection open confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
avahowell committed Aug 21, 2024
1 parent d80c0b2 commit 52e53a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions crates/core/app/tests/common/ibc_tests/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,9 @@ impl MockRelayer {
// at this point, chain A is in OPEN and B is in TRYOPEN.
// afterwards, chain A will be in OPEN and chain B will be in OPEN.
pub async fn _build_and_send_connection_open_confirm(&mut self) -> Result<()> {
// This is a load-bearing block execution that should be removed
self.chain_a_ibc.node.block().execute().await?;
self.chain_b_ibc.node.block().execute().await?;
self._sync_chains().await?;

// https://github.com/penumbra-zone/hermes/blob/a34a11fec76de3b573b539c237927e79cb74ec00/crates/relayer/src/connection.rs#L1296
Expand All @@ -758,10 +761,12 @@ impl MockRelayer {
.await?
.into_inner();

// Build message(s) for updating client on destination
println!("UPDATE4");
let dst_client_target_height = self.chain_a_ibc.get_latest_height().await?;
let dst_client_target_height = self._build_and_send_update_client_b().await?;

self.chain_a_ibc.node.block().execute().await?;
self.chain_b_ibc.node.block().execute().await?;
self._build_and_send_update_client_b().await?;
self._sync_chains().await?;

let plan = {
// This mocks the relayer constructing a connection open try message on behalf
Expand Down
4 changes: 4 additions & 0 deletions crates/core/app/tests/ibc_handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ async fn ibc_handshake() -> anyhow::Result<()> {

relayer._build_and_send_connection_open_ack().await?;

relayer._sync_chains().await?;

relayer._build_and_send_connection_open_confirm().await?;

Ok(()).tap(|_| drop(relayer)).tap(|_| drop(guard))
}

Expand Down

0 comments on commit 52e53a9

Please # to comment.