Trait ibc_testkit::testapp::ibc::clients::mock::client_state::MockClientContext
source · pub trait MockClientContext {
type ConversionError: ToString;
type AnyConsensusState: TryInto<MockConsensusState, Error = Self::ConversionError>;
// Required methods
fn host_timestamp(&self) -> Result<Timestamp, ContextError>;
fn host_height(&self) -> Result<Height, ContextError>;
fn consensus_state(
&self,
client_cons_state_path: &ClientConsensusStatePath
) -> Result<Self::AnyConsensusState, ContextError>;
}Required Associated Types§
type ConversionError: ToString
type AnyConsensusState: TryInto<MockConsensusState, Error = Self::ConversionError>
Required Methods§
sourcefn host_timestamp(&self) -> Result<Timestamp, ContextError>
fn host_timestamp(&self) -> Result<Timestamp, ContextError>
Returns the current timestamp of the local chain.
sourcefn host_height(&self) -> Result<Height, ContextError>
fn host_height(&self) -> Result<Height, ContextError>
Returns the current height of the local chain.
sourcefn consensus_state(
&self,
client_cons_state_path: &ClientConsensusStatePath
) -> Result<Self::AnyConsensusState, ContextError>
fn consensus_state( &self, client_cons_state_path: &ClientConsensusStatePath ) -> Result<Self::AnyConsensusState, ContextError>
Retrieve the consensus state for the given client ID at the specified height.
Returns an error if no such state exists.