fn consensus_states(&self) -> Result<Vec<AnyConsensusStateWithHeight>, ForeignClientError> {
        let mut consensus_states = self
            .dst_chain
            .query_consensus_states(QueryConsensusStatesRequest {
                client_id: self.id.to_string(),
                pagination: ibc_proto::cosmos::base::query::pagination::all(),
            })
            .map_err(|e| {
                ForeignClientError::ClientQuery(
                    self.id().clone(),
                    self.src_chain.id(),
                    format!("{}", e),
                )
            })?;
        consensus_states.sort_by_key(|a| std::cmp::Reverse(a.height));
        Ok(consensus_states)
    }
/// Retrieves all consensus states for this client and sorts them in descending height
/// order. If consensus states are not pruned on chain, then last consensus state is the one
/// installed by the `CreateClient` operation.
Retrieves all consensus states for this client and sorts them in descending height
order. If consensus states are not pruned on chain, then last consensus state is the one
installed by the `CreateClient` operation.
Retrieves all consensus states for this client and sorts them in descending height order . If consensus states are not pruned on chain then last consensus state is the one installed by the ` CreateClient ` operation .
fn consensus_states(&self) -> Result<Vec<AnyConsensusStateWithHeight>, ForeignClientError> {
        let mut consensus_states = self
            .dst_chain
            .query_consensus_states(QueryConsensusStatesRequest {
                client_id: self.id.to_string(),
                pagination: ibc_proto::cosmos::base::query::pagination::all(),
            })
            .map_err(|e| {
                ForeignClientError::ClientQuery(
                    self.id().clone(),
                    self.src_chain.id(),
                    format!("{}", e),
                )
            })?;
        consensus_states.sort_by_key(|a| std::cmp::Reverse(a.height));
        Ok(consensus_states)
    }
fn consensus_states ( & self ) -> Result < Vec < AnyConsensusStateWithHeight > , ForeignClientError > { let mut consensus_states = self . dst_chain . query_consensus_states ( QueryConsensusStatesRequest { client_id : self . id . to_string ( ) , pagination : ibc_proto :: cosmos :: base :: query :: pagination :: all ( ) , } ) . map_err ( | e | { ForeignClientError :: ClientQuery ( self . id ( ) . clone ( ) , self . src_chain . id ( ) , format ! ( " " e ) , ) } ) ? ; consensus_states . sort_by_key ( | a | std :: cmp :: Reverse ( a . height ) ) ; Ok ( consensus_states ) }
Retrieves all consensus states for this client and sorts them in descending height
order.
Retrieves all consensus states for this client and sorts them in descending height order .
&self
&self