fn validate_clients(
        a_client: &ForeignClient,
        b_client: &ForeignClient,
    ) -> Result<(), ConnectionError> {
        if a_client.src_chain().id() != b_client.dst_chain().id() {
            return Err(ConnectionError::ConstructorFailed(format!(
                "the source chain of client a ({}) does not not match the destination chain of client b ({})",
                a_client.src_chain().id(),
                b_client.dst_chain().id()
            )));
        }

        if a_client.dst_chain().id() != b_client.src_chain().id() {
            return Err(ConnectionError::ConstructorFailed(format!(
                "the destination chain of client a ({}) does not not match the source chain of client b ({})",
                a_client.dst_chain().id(),
                b_client.src_chain().id()
            )));
        }

        Ok(())
    }
// Verifies that the two clients are mutually consistent, i.e., they serve the same two chains.
Verifies that the two clients are mutually consistent, i.e., they serve the same two chains.
Verifies that the two clients are mutually consistent i . e . they serve the same two chains .
fn validate_clients(
        a_client: &ForeignClient,
        b_client: &ForeignClient,
    ) -> Result<(), ConnectionError> {
        if a_client.src_chain().id() != b_client.dst_chain().id() {
            return Err(ConnectionError::ConstructorFailed(format!(
                "the source chain of client a ({}) does not not match the destination chain of client b ({})",
                a_client.src_chain().id(),
                b_client.dst_chain().id()
            )));
        }
        if a_client.dst_chain().id() != b_client.src_chain().id() {
            return Err(ConnectionError::ConstructorFailed(format!(
                "the destination chain of client a ({}) does not not match the source chain of client b ({})",
                a_client.dst_chain().id(),
                b_client.src_chain().id()
            )));
        }
        Ok(())
    }
fn validate_clients ( a_client : & ForeignClient , b_client : & ForeignClient , ) -> Result < ( ) , ConnectionError > { if a_client . src_chain ( ) . id ( ) != b_client . dst_chain ( ) . id ( ) { return Err ( ConnectionError :: ConstructorFailed ( format ! ( " " a_client src_chain ( ) id ( ) b_client dst_chain ( ) id ( ) ) ) ) ; } if a_client . dst_chain ( ) . id ( ) != b_client . src_chain ( ) . id ( ) { return Err ( ConnectionError :: ConstructorFailed ( format ! ( " " a_client dst_chain ( ) id ( ) b_client src_chain ( ) id ( ) ) ) ) ; } Ok ( ( ) ) }
Verifies that the two clients are mutually consistent, i.e., they serve the same two chains.
Verifies that the two clients are mutually consistent i . e . they serve the same two chains .
a_client
&ForeignClient
b_client
&ForeignClient
a_client
&ForeignClient
b_client
&ForeignClient