/// Creates a certification for the given height, including a valid hash but
/// with a fake signature.
Creates a certification for the given height, including a valid hash but
with a fake signature.
Creates a certification for the given height including a valid hash but with a fake signature .
fn certify_height(state_manager: &impl StateManager, h: Height) -> Certification {
    let hash = state_manager
        .list_state_hashes_to_certify()
        .into_iter()
        .find_map(|(height, hash)| if height == h { Some(hash) } else { None })
        .expect("no hash to certify");
    let certification = Certification {
        height: h,
        signed: Signed {
            content: CertificationContent::new(hash),
            signature: ThresholdSignature::fake(),
        },
    };
    state_manager.deliver_state_certification(certification.clone());
    certification
}
fn certify_height ( state_manager : & impl StateManager , h : Height ) -> Certification { let hash = state_manager . list_state_hashes_to_certify ( ) . into_iter ( ) . find_map ( | ( height , hash ) | if height == h { Some ( hash ) } else { None } ) . expect ( " " ) ; let certification = Certification { height : h , signed : Signed { content : CertificationContent :: new ( hash ) , signature : ThresholdSignature :: fake ( ) , } , } ; state_manager . deliver_state_certification ( certification . clone ( ) ) ; certification }
Creates a certification for the given height, including a valid hash but
with a fake signature.
Creates a certification for the given height including a valid hash but with a fake signature .
state_manager
&impl StateManager
h
Height