pub fn log256(value: &U256) -> u8
Expand description
Returns the (ceiled) log base 256 of the value
assert_eq!(bitcoin::utils::log256(&256u32.into()), 1);
assert_eq!(bitcoin::utils::log256(&257u32.into()), 2);
assert_eq!(bitcoin::utils::log256(&65536u32.into()), 2);
assert_eq!(bitcoin::utils::log256(&65537u32.into()), 3);