Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6e09f66

Browse files
committedJun 24, 2024·
use consensus state timestamp instead of update time
1 parent 02785e4 commit 6e09f66

File tree

1 file changed

+3
-5
lines changed
  • crates/core/component/ibc/src/component

1 file changed

+3
-5
lines changed
 

‎crates/core/component/ibc/src/component/packet.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,12 @@ pub trait SendPacketRead: StateRead {
155155

156156
// check that the timeout timestamp hasn't already passed in the local client tracking
157157
// the receiving chain
158-
let chain_ts = self
159-
.get_client_update_time(&connection.client_id, &latest_height)
160-
.await?;
161-
if packet.timeout_timestamp <= chain_ts.nanoseconds() {
158+
let chain_ts = latest_consensus_state.timestamp.unix_timestamp_nanos() as u64;
159+
if packet.timeout_timestamp <= chain_ts {
162160
anyhow::bail!(
163161
"timeout timestamp {} is less than the latest timestamp on the counterparty {}",
164162
packet.timeout_timestamp,
165-
chain_ts.nanoseconds(),
163+
chain_ts,
166164
);
167165
}
168166

0 commit comments

Comments
 (0)
Please sign in to comment.