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§

Required Methods§

source

fn host_timestamp(&self) -> Result<Timestamp, ContextError>

Returns the current timestamp of the local chain.

source

fn host_height(&self) -> Result<Height, ContextError>

Returns the current height of the local chain.

source

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.

Implementors§