fn build_consensus_state(
        &mut self,
        trusted: Height,
        target: Height,
        client_state: AnyClientState,
        reply_to: ReplyTo<AnyConsensusState>,
    ) -> Result<(), Error> {
        let light_block = self.light_client.verify(trusted, target, &client_state)?;

        let consensus_state = self
            .chain
            .build_consensus_state(light_block)
            .map(|cs| cs.wrap_any());

        reply_to
            .send(consensus_state)
            .map_err(|e| Kind::Channel.context(e))?;

        Ok(())
    }
/// Constructs a consensus state for the given height
Constructs a consensus state for the given height
Constructs a consensus state for the given height
fn build_consensus_state(
        &mut self,
        trusted: Height,
        target: Height,
        client_state: AnyClientState,
        reply_to: ReplyTo<AnyConsensusState>,
    ) -> Result<(), Error> {
        let light_block = self.light_client.verify(trusted, target, &client_state)?;
        let consensus_state = self
            .chain
            .build_consensus_state(light_block)
            .map(|cs| cs.wrap_any());
        reply_to
            .send(consensus_state)
            .map_err(|e| Kind::Channel.context(e))?;
        Ok(())
    }
fn build_consensus_state ( & mut self , trusted : Height , target : Height , client_state : AnyClientState , reply_to : ReplyTo < AnyConsensusState > , ) -> Result < ( ) , Error > { let light_block = self . light_client . verify ( trusted , target , & client_state ) ? ; let consensus_state = self . chain . build_consensus_state ( light_block ) . map ( | cs | cs . wrap_any ( ) ) ; reply_to . send ( consensus_state ) . map_err ( | e | Kind :: Channel . context ( e ) ) ? ; Ok ( ( ) ) }
Constructs a consensus state for the given height
Constructs a consensus state for the given height
&mut self
trusted
Height
target
Height
client_state
AnyClientState
reply_to
ReplyTo<AnyConsensusState>
&mut self
trusted
Height
target
Height
client_state
AnyClientState
reply_to
ReplyTo<AnyConsensusState>