pub fn block_to_cht_number<N: SimpleArithmetic>(cht_size: u64, block_num: N) -> Option<N> {
	if block_num == N::zero() {
		None
	} else {
		Some((block_num - N::one()) / As::sa(cht_size))
	}
}
/// Convert a block number to a CHT number.
/// Returns `None` for `block_num` == 0, `Some` otherwise.
Convert a block number to a CHT number.
Convert a block number to a CHT number .
pub fn block_to_cht_number<N: SimpleArithmetic>(cht_size: u64, block_num: N) -> Option<N> {
	if block_num == N::zero() {
		None
	} else {
		Some((block_num - N::one()) / As::sa(cht_size))
	}
}
pub fn block_to_cht_number < N : SimpleArithmetic > ( cht_size : u64 , block_num : N ) -> Option < N > { if block_num == N :: zero ( ) { None } else { Some ( ( block_num - N :: one ( ) ) / As :: sa ( cht_size ) ) } }
Convert a block number to a CHT number.
Convert a block number to a CHT number .
cht_size
u64
block_num
N
cht_size
u64
block_num
N