diff --git a/Cargo.lock b/Cargo.lock index 60b3d0aecf..0ebc12aaf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1328,7 +1328,6 @@ dependencies = [ "bech32", "bitcoin", "bytes", - "chrono", "crossbeam-channel 0.5.1", "dirs-next", "env_logger", diff --git a/relayer/Cargo.toml b/relayer/Cargo.toml index cef42709ee..e6fbbc2452 100644 --- a/relayer/Cargo.toml +++ b/relayer/Cargo.toml @@ -25,7 +25,6 @@ ibc = { version = "0.9.0", path = "../modules" } ibc-proto = { version = "0.13.0", path = "../proto" } ibc-telemetry = { version = "0.9.0", path = "../telemetry", optional = true } -chrono = { version = "0.4.19", default-features = false, features = ["clock"] } subtle-encoding = "0.5" async-trait = "0.1.50" humantime-serde = "1.0.0" diff --git a/relayer/src/chain/cosmos.rs b/relayer/src/chain/cosmos.rs index 6c22c0f498..d59bb92b25 100644 --- a/relayer/src/chain/cosmos.rs +++ b/relayer/src/chain/cosmos.rs @@ -12,7 +12,6 @@ use std::{fmt, thread, time::Instant}; use bech32::{ToBase32, Variant}; use bitcoin::hashes::hex::ToHex; -use chrono::DateTime; use itertools::Itertools; use prost::Message; use prost_types::Any; @@ -56,7 +55,6 @@ use ibc::core::ics24_host::{ClientUpgradePath, Path, IBC_QUERY_PATH, SDK_UPGRADE use ibc::events::{from_tx_response_event, IbcEvent}; use ibc::query::{QueryTxHash, QueryTxRequest}; use ibc::signer::Signer; -use ibc::timestamp::Timestamp; use ibc::Height as ICSHeight; use ibc::{downcast, query::QueryBlockRequest}; use ibc_proto::cosmos::auth::v1beta1::{BaseAccount, EthAccount, QueryAccountRequest}; @@ -1098,7 +1096,7 @@ impl ChainEndpoint for CosmosSdkChain { crate::time!("query_status"); let status = self.status()?; - let time = DateTime::from(status.sync_info.latest_block_time); + let time = status.sync_info.latest_block_time; let height = ICSHeight { revision_number: ChainId::chain_version(status.node_info.network.as_str()), revision_height: u64::from(status.sync_info.latest_block_height), @@ -1106,7 +1104,7 @@ impl ChainEndpoint for CosmosSdkChain { Ok(StatusResponse { height, - timestamp: Timestamp::from_datetime(time), + timestamp: time.into(), }) } diff --git a/relayer/src/foreign_client.rs b/relayer/src/foreign_client.rs index a45ebe9f6a..0fc6447ecf 100644 --- a/relayer/src/foreign_client.rs +++ b/relayer/src/foreign_client.rs @@ -2,7 +2,6 @@ use core::{fmt, time::Duration}; use std::thread; use std::time::Instant; -use chrono::Utc; use itertools::Itertools; use prost_types::Any; use tracing::{debug, error, info, trace, warn}; @@ -569,7 +568,7 @@ impl ForeignClient