fn calc_fee_repr(fee: u16) -> Vec<u8> {
    assert!(fee < 4096);
    let r = (fee % 64) as u8;
    let l = (fee / 64) as u8;
    let mut ret = vec![];
    ret.extend(fee_helper(l));
    ret.extend(fee_helper(r));
    ret
}
// Format the fee-into to the desired format
// fee is specified in amount per single-satoshi-fee
// We convert the binary encoding by replacing all ones
// in the binary representation with the positions of ones
// in the system and removing all the zeros.
// We specify fees in 12 bits(2**12 = 4096)
// approximately multiples of 0.025%.
// This assumes that fees must be less than 2^48 (> 2 million BTC).
// Club the fee representation into two groups of 6 bits each
// For example fee = 100 (1 sat per 100 sats sent) or 1%
// Each character is a byte.
// 101 = [0 0 0 0 0  1] [1 0 0 1 0 1] (12 bits total)
//     =  [0 - 1]  [5 2 0 -1] //-1 is split delimiter
//     =  [0 -1 5 2 0 -1] as u8 array.
Format the fee-into to the desired format
fee is specified in amount per single-satoshi-fee
We convert the binary encoding by replacing all ones
in the binary representation with the positions of ones
in the system and removing all the zeros.
We specify fees in 12 bits(2**12 = 4096)
approximately multiples of 0.025%.
This assumes that fees must be less than 2^48 (> 2 million BTC).
Club the fee representation into two groups of 6 bits each
For example fee = 100 (1 sat per 100 sats sent) or 1%
Each character is a byte.
Format the fee - into to the desired format fee is specified in amount per single - satoshi - fee We convert the binary encoding by replacing all ones in the binary representation with the positions of ones in the system and removing all the zeros . We specify fees in 12 bits ( 2 ** 12 = 4096 ) approximately multiples of 0 . 025% . This assumes that fees must be less than 2^48 ( > 2 million BTC ) . Club the fee representation into two groups of 6 bits each For example fee = 100 ( 1 sat per 100 sats sent ) or 1% Each character is a byte .
fn calc_fee_repr(fee: u16) -> Vec<u8> {
    assert!(fee < 4096);
    let r = (fee % 64) as u8;
    let l = (fee / 64) as u8;
    let mut ret = vec![];
    ret.extend(fee_helper(l));
    ret.extend(fee_helper(r));
    ret
}
fn calc_fee_repr ( fee : u16 ) -> Vec < u8 > { assert ! ( fee 4096 ) ; let r = ( fee % 64 ) as u8 ; let l = ( fee / 64 ) as u8 ; let mut ret = vec ! [ ] ; ret . extend ( fee_helper ( l ) ) ; ret . extend ( fee_helper ( r ) ) ; ret }
Format the fee-into to the desired format
fee is specified in amount per single-satoshi-fee
We convert the binary encoding by replacing all ones
in the binary representation with the positions of ones
in the system and removing all the zeros.
Format the fee - into to the desired format fee is specified in amount per single - satoshi - fee We convert the binary encoding by replacing all ones in the binary representation with the positions of ones in the system and removing all the zeros .
fee
u16
fee
u16