pub async fn msg_create_tendermint_client(
    chain: &Chain,
    instance: &mut Instance,
) -> Result<(TendermintClientState, TendermintConsensusState)> {
    let trust_level = Some(Fraction {
        numerator: *chain.config.trust_level.numer(),
        denominator: *chain.config.trust_level.denom(),
    });

    let unbonding_period = Some(get_unbonding_period(chain).await?);
    let latest_header = get_latest_header(instance)?;
    let latest_height = get_block_height(chain, &latest_header);

    let client_state = TendermintClientState {
        chain_id: chain.id.to_string(),
        trust_level,
        trusting_period: Some(chain.config.trusting_period.into()),
        unbonding_period,
        max_clock_drift: Some(chain.config.max_clock_drift.into()),
        frozen_height: Some(Height::zero()),
        latest_height: Some(latest_height),
        proof_specs: proof_specs(),
        upgrade_path: vec!["upgrade".to_string(), "upgradedIBCState".to_string()],
        allow_update_after_expiry: false,
        allow_update_after_misbehaviour: false,
    };

    let consensus_state = TendermintConsensusState::from_block_header(latest_header);

    Ok((client_state, consensus_state))
}
/// Builds a transaction to create a tendermint client on IBC enabled solo machine
Builds a transaction to create a tendermint client on IBC enabled solo machine
Builds a transaction to create a tendermint client on IBC enabled solo machine
pub async fn msg_create_tendermint_client(
    chain: &Chain,
    instance: &mut Instance,
) -> Result<(TendermintClientState, TendermintConsensusState)> {
    let trust_level = Some(Fraction {
        numerator: *chain.config.trust_level.numer(),
        denominator: *chain.config.trust_level.denom(),
    });
    let unbonding_period = Some(get_unbonding_period(chain).await?);
    let latest_header = get_latest_header(instance)?;
    let latest_height = get_block_height(chain, &latest_header);
    let client_state = TendermintClientState {
        chain_id: chain.id.to_string(),
        trust_level,
        trusting_period: Some(chain.config.trusting_period.into()),
        unbonding_period,
        max_clock_drift: Some(chain.config.max_clock_drift.into()),
        frozen_height: Some(Height::zero()),
        latest_height: Some(latest_height),
        proof_specs: proof_specs(),
        upgrade_path: vec!["upgrade".to_string(), "upgradedIBCState".to_string()],
        allow_update_after_expiry: false,
        allow_update_after_misbehaviour: false,
    };
    let consensus_state = TendermintConsensusState::from_block_header(latest_header);
    Ok((client_state, consensus_state))
}
pub async fn msg_create_tendermint_client ( chain : & Chain , instance : & mut Instance , ) -> Result < ( TendermintClientState , TendermintConsensusState ) > { let trust_level = Some ( Fraction { numerator : * chain . config . trust_level . numer ( ) , denominator : * chain . config . trust_level . denom ( ) , } ) ; let unbonding_period = Some ( get_unbonding_period ( chain ) . await ? ) ; let latest_header = get_latest_header ( instance ) ? ; let latest_height = get_block_height ( chain , & latest_header ) ; let client_state = TendermintClientState { chain_id : chain . id . to_string ( ) , trust_level , trusting_period : Some ( chain . config . trusting_period . into ( ) ) , unbonding_period , max_clock_drift : Some ( chain . config . max_clock_drift . into ( ) ) , frozen_height : Some ( Height :: zero ( ) ) , latest_height : Some ( latest_height ) , proof_specs : proof_specs ( ) , upgrade_path : vec ! [ " " to_string ( ) " " to_string ( ) ] , allow_update_after_expiry : false , allow_update_after_misbehaviour : false , } ; let consensus_state = TendermintConsensusState :: from_block_header ( latest_header ) ; Ok ( ( client_state , consensus_state ) ) }
Builds a transaction to create a tendermint client on IBC enabled solo machine
Builds a transaction to create a tendermint client on IBC enabled solo machine
chain
&Chain
instance
&mut Instance
chain
&Chain
instance
&mut Instance