fn compute_fast_link(chain_length: u64) -> u64 {
    let order = chain_length % 32;
    let distance = if order == 0 { 1 } else { (1 << order) - 1 };
    if distance < chain_length {
        chain_length - distance
    } else {
        0
    }
}
/// Compute the fast link for a block with a given chain_length. Successive
/// blocks make a chain_length jump equal to differents powers of two, minus
/// 1, e.g. 1, 3, 7, 15, 31, ...
Compute the fast link for a block with a given chain_length. Successive
blocks make a chain_length jump equal to differents powers of two, minus
1, e.g.
Compute the fast link for a block with a given chain_length . Successive blocks make a chain_length jump equal to differents powers of two minus 1 e . g .
fn compute_fast_link(chain_length: u64) -> u64 {
    let order = chain_length % 32;
    let distance = if order == 0 { 1 } else { (1 << order) - 1 };
    if distance < chain_length {
        chain_length - distance
    } else {
        0
    }
}
fn compute_fast_link ( chain_length : u64 ) -> u64 { let order = chain_length % 32 ; let distance = if order == 0 { 1 } else { ( 1 << order ) - 1 } ; if distance < chain_length { chain_length - distance } else { 0 } }
Compute the fast link for a block with a given chain_length.
Compute the fast link for a block with a given chain_length .
chain_length
u64
chain_length
u64