From 5f5b739a154cb0a265ff0e9f317bcc1b49f3f630 Mon Sep 17 00:00:00 2001 From: Ava Howell Date: Mon, 24 Jun 2024 17:56:18 -0700 Subject: [PATCH] ibc: fix logging of timestamp timeouts (#4654) Signed-off-by: Chris Czub Co-authored-by: Chris Czub --- crates/core/component/ibc/src/component/packet.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/core/component/ibc/src/component/packet.rs b/crates/core/component/ibc/src/component/packet.rs index 5bbd9dc186..032986f079 100644 --- a/crates/core/component/ibc/src/component/packet.rs +++ b/crates/core/component/ibc/src/component/packet.rs @@ -155,13 +155,11 @@ pub trait SendPacketRead: StateRead { // check that the timeout timestamp hasn't already passed in the local client tracking // the receiving chain - let chain_ts = self - .get_client_update_time(&connection.client_id, &latest_height) - .await?; - if packet.timeout_timestamp <= chain_ts.nanoseconds() { + let chain_ts = latest_consensus_state.timestamp.unix_timestamp_nanos() as u64; + if packet.timeout_timestamp <= chain_ts { anyhow::bail!( "timeout timestamp {} is less than the latest timestamp on the counterparty {}", - packet.timeout_height, + packet.timeout_timestamp, chain_ts, ); }