diff --git a/common/cf-solana/src/client/impls.rs b/common/cf-solana/src/client/impls.rs index 4f0ab53c..afe911c4 100644 --- a/common/cf-solana/src/client/impls.rs +++ b/common/cf-solana/src/client/impls.rs @@ -2,6 +2,8 @@ use alloc::string::ToString; use alloc::vec::Vec; use core::num::NonZeroU64; +use ibc_core_client_context::consensus_state::ConsensusState as _; + use crate::proto::Any; use crate::{ proof, ClientMessage, ClientState, ConsensusState, Header, Misbehaviour, @@ -168,7 +170,6 @@ impl ibc::ClientStateCommon for ClientState { } } - impl ibc::ClientStateExecution for ClientState where E: ibc::ExecutionContext + ibc::ClientExecutionContext + CommonContext, @@ -311,7 +312,6 @@ where } } - impl ClientState { pub fn do_update_state( &self, @@ -486,8 +486,8 @@ impl ClientState { host_timestamp: ibc::Timestamp, ) -> bool { let expiry_ns = consensus - .timestamp_sec - .get() + .timestamp() + .nanoseconds() .saturating_add(self.trusting_period_ns); ibc::Timestamp::from_nanoseconds(expiry_ns).unwrap() <= host_timestamp } @@ -511,12 +511,10 @@ impl ClientState { } } - fn error(msg: impl ToString) -> ibc::ClientError { ibc::ClientError::Other { description: msg.to_string() } } - /// Checks client id’s client type is what’s expected and then parses the id as /// `ClientIdx`. /// @@ -536,7 +534,6 @@ fn parse_client_id(client_id: &ibc::ClientId) -> Result { Err(ibc::ClientError::ClientSpecific { description }) } - #[test] fn test_verify_client_type() { use core::str::FromStr;