Skip to content

Commit ef6e114

Browse files
committed
use consensus state timestamp instead of update time
1 parent beacd27 commit ef6e114

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;
159+
if packet.timeout_timestamp <= chain_ts.unix_timestamp_nanos() as u64 {
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.unix_timestamp_nanos(),
166164
);
167165
}
168166

0 commit comments

Comments
 (0)