From b1dae8ed7d311d88398d0823f6109d9035c34f53 Mon Sep 17 00:00:00 2001 From: Ava Howell Date: Mon, 25 Sep 2023 18:39:25 -0700 Subject: [PATCH] ibc: use GTE instead of GT in client height comparison --- .../ibc/src/component/msg_handler/connection_open_ack.rs | 2 +- .../ibc/src/component/msg_handler/connection_open_try.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core/component/ibc/src/component/msg_handler/connection_open_ack.rs b/crates/core/component/ibc/src/component/msg_handler/connection_open_ack.rs index 26980c7072..a4405e41ad 100644 --- a/crates/core/component/ibc/src/component/msg_handler/connection_open_ack.rs +++ b/crates/core/component/ibc/src/component/msg_handler/connection_open_ack.rs @@ -195,7 +195,7 @@ async fn consensus_height_is_correct( state.get_revision_number().await?, state.get_block_height().await?, )?; - if msg.consensus_height_of_a_on_b > current_height { + if msg.consensus_height_of_a_on_b >= current_height { anyhow::bail!("consensus height is greater than the current block height",); } diff --git a/crates/core/component/ibc/src/component/msg_handler/connection_open_try.rs b/crates/core/component/ibc/src/component/msg_handler/connection_open_try.rs index f68b911861..49547223fa 100644 --- a/crates/core/component/ibc/src/component/msg_handler/connection_open_try.rs +++ b/crates/core/component/ibc/src/component/msg_handler/connection_open_try.rs @@ -204,7 +204,7 @@ async fn consensus_height_is_correct( state.get_revision_number().await?, state.get_block_height().await?, )?; - if msg.consensus_height_of_b_on_a > current_height { + if msg.consensus_height_of_b_on_a >= current_height { anyhow::bail!("consensus height is greater than the current block height",); }