Skip to content

Commit

Permalink
ibc: fix logging of timestamp timeouts (#4654)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Czub <[email protected]>
Co-authored-by: Chris Czub <[email protected]>
  • Loading branch information
avahowell and zbuc committed Jun 25, 2024
1 parent d95258b commit 5f5b739
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/core/component/ibc/src/component/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}
Expand Down

0 comments on commit 5f5b739

Please sign in to comment.