fn leaf_hash(cm: Scalar, t: &TransactionTime) -> Scalar {
    let bits_cm = {
        let mut tmp = [false; 256];
        for (a, b) in tmp.iter_mut().zip(cm.to_repr().as_bits::<order::Lsb0>()) {
            *a = *b;
        }
        tmp
    };
    let bits_t = {
        let mut tmp = [false; 64];
        for (a, b) in tmp.iter_mut().zip(t.0.as_bits::<order::Lsb0>()) {
            *a = *b;
        }
        tmp
    };
    jubjub::ExtendedPoint::from(pedersen_hash(
        Personalisation::MemLeaf,
        bits_cm
            .iter()
            .copied()
            .take(Scalar::NUM_BITS as usize)
            .chain(bits_t.iter().copied()),
    ))
    .to_affine()
    .get_u()
}
/// Compute the hash of a commitment `cm` and time `t` to obtain a proper leaf value.
Compute the hash of a commitment `cm` and time `t` to obtain a proper leaf value.
Compute the hash of a commitment ` cm ` and time ` t ` to obtain a proper leaf value .
fn leaf_hash(cm: Scalar, t: &TransactionTime) -> Scalar {
    let bits_cm = {
        let mut tmp = [false; 256];
        for (a, b) in tmp.iter_mut().zip(cm.to_repr().as_bits::<order::Lsb0>()) {
            *a = *b;
        }
        tmp
    };
    let bits_t = {
        let mut tmp = [false; 64];
        for (a, b) in tmp.iter_mut().zip(t.0.as_bits::<order::Lsb0>()) {
            *a = *b;
        }
        tmp
    };
    jubjub::ExtendedPoint::from(pedersen_hash(
        Personalisation::MemLeaf,
        bits_cm
            .iter()
            .copied()
            .take(Scalar::NUM_BITS as usize)
            .chain(bits_t.iter().copied()),
    ))
    .to_affine()
    .get_u()
}
fn leaf_hash ( cm : Scalar , t : & TransactionTime ) -> Scalar { let bits_cm = { let mut tmp = [ false ; 256 ] ; for ( a , b ) in tmp . iter_mut ( ) . zip ( cm . to_repr ( ) . as_bits :: < order :: Lsb0 > ( ) ) { * a = * b ; } tmp } ; let bits_t = { let mut tmp = [ false ; 64 ] ; for ( a , b ) in tmp . iter_mut ( ) . zip ( t . 0 . as_bits :: < order :: Lsb0 > ( ) ) { * a = * b ; } tmp } ; jubjub :: ExtendedPoint :: from ( pedersen_hash ( Personalisation :: MemLeaf , bits_cm . iter ( ) . copied ( ) . take ( Scalar :: NUM_BITS as usize ) . chain ( bits_t . iter ( ) . copied ( ) ) , ) ) . to_affine ( ) . get_u ( ) }
Compute the hash of a commitment `cm` and time `t` to obtain a proper leaf value.
Compute the hash of a commitment ` cm ` and time ` t ` to obtain a proper leaf value .
cm
Scalar
t
&TransactionTime
cm
Scalar
t
&TransactionTime