pub fn build_conn_confirm(&self) -> Result<Vec<Any>, ConnectionError> {
        let _expected_dst_connection = self
            .validated_expected_connection(ConnectionMsgType::OpenAck)
            .map_err(|e| {
                    ConnectionError::Failed(format!(
                    "confirm options inconsistent with existing connection on destination chain; context={}", e))
            })?;

        let query_height = self
            .src_chain()
            .query_latest_height()
            .map_err(|e| ConnectionError::QueryError(self.src_chain().id(), e))?;
        let _src_connection = self
            .src_chain()
            .query_connection(self.src_connection_id(), query_height)
            .map_err(|_| {
                ConnectionError::Failed(format!(
                    "missing connection {} on source chain",
                    self.src_connection_id()
                ))
            })?;

        // TODO - check that the src connection is consistent with the confirm options

        let (_, proofs) = self
            .src_chain()
            .build_connection_proofs_and_client_state(
                ConnectionMsgType::OpenConfirm,
                self.src_connection_id(),
                self.src_client_id(),
                query_height,
            )
            .map_err(|e| {
                ConnectionError::Failed(format!("failed to build connection proofs: {}", e))
            })?;

        // Build message(s) for updating client on destination
        let mut msgs = self.build_update_client_on_dst(proofs.height())?;

        // Get signer
        let signer = self.dst_chain().get_signer().map_err(|e| {
            ConnectionError::Failed(format!(
                "failed while fetching the signer for dst chain ({}) with error: {}",
                self.dst_chain().id(),
                e
            ))
        })?;

        let new_msg = MsgConnectionOpenConfirm {
            connection_id: self.dst_connection_id().clone(),
            proofs,
            signer,
        };

        msgs.push(new_msg.to_any());
        Ok(msgs)
    }
/// Attempts to build a MsgConnOpenConfirm.
Attempts to build a MsgConnOpenConfirm.
Attempts to build a MsgConnOpenConfirm .
pub fn build_conn_confirm(&self) -> Result<Vec<Any>, ConnectionError> {
        let _expected_dst_connection = self
            .validated_expected_connection(ConnectionMsgType::OpenAck)
            .map_err(|e| {
                    ConnectionError::Failed(format!(
                    "confirm options inconsistent with existing connection on destination chain; context={}", e))
            })?;
        let query_height = self
            .src_chain()
            .query_latest_height()
            .map_err(|e| ConnectionError::QueryError(self.src_chain().id(), e))?;
        let _src_connection = self
            .src_chain()
            .query_connection(self.src_connection_id(), query_height)
            .map_err(|_| {
                ConnectionError::Failed(format!(
                    "missing connection {} on source chain",
                    self.src_connection_id()
                ))
            })?;
        // TODO - check that the src connection is consistent with the confirm options
        let (_, proofs) = self
            .src_chain()
            .build_connection_proofs_and_client_state(
                ConnectionMsgType::OpenConfirm,
                self.src_connection_id(),
                self.src_client_id(),
                query_height,
            )
            .map_err(|e| {
                ConnectionError::Failed(format!("failed to build connection proofs: {}", e))
            })?;
        // Build message(s) for updating client on destination
        let mut msgs = self.build_update_client_on_dst(proofs.height())?;
        // Get signer
        let signer = self.dst_chain().get_signer().map_err(|e| {
            ConnectionError::Failed(format!(
                "failed while fetching the signer for dst chain ({}) with error: {}",
                self.dst_chain().id(),
                e
            ))
        })?;
        let new_msg = MsgConnectionOpenConfirm {
            connection_id: self.dst_connection_id().clone(),
            proofs,
            signer,
        };
        msgs.push(new_msg.to_any());
        Ok(msgs)
    }
pub fn build_conn_confirm ( & self ) -> Result < Vec < Any > , ConnectionError > { let _expected_dst_connection = self . validated_expected_connection ( ConnectionMsgType :: OpenAck ) . map_err ( | e | { ConnectionError :: Failed ( format ! ( " " e ) ) } ) ? ; let query_height = self . src_chain ( ) . query_latest_height ( ) . map_err ( | e | ConnectionError :: QueryError ( self . src_chain ( ) . id ( ) , e ) ) ? ; let _src_connection = self . src_chain ( ) . query_connection ( self . src_connection_id ( ) , query_height ) . map_err ( | _ | { ConnectionError :: Failed ( format ! ( " " self src_connection_id ( ) ) ) } ) ? ; // TODO - check that the src connection is consistent with the confirm options let ( _ , proofs ) = self . src_chain ( ) . build_connection_proofs_and_client_state ( ConnectionMsgType :: OpenConfirm , self . src_connection_id ( ) , self . src_client_id ( ) , query_height , ) . map_err ( | e | { ConnectionError :: Failed ( format ! ( " " e ) ) } ) ? ; // Build message(s) for updating client on destination let mut msgs = self . build_update_client_on_dst ( proofs . height ( ) ) ? ; // Get signer let signer = self . dst_chain ( ) . get_signer ( ) . map_err ( | e | { ConnectionError :: Failed ( format ! ( " " self dst_chain ( ) id ( ) e ) ) } ) ? ; let new_msg = MsgConnectionOpenConfirm { connection_id : self . dst_connection_id ( ) . clone ( ) , proofs , signer , } ; msgs . push ( new_msg . to_any ( ) ) ; Ok ( msgs ) }
Attempts to build a MsgConnOpenConfirm.
Attempts to build a MsgConnOpenConfirm .
&self
&self