pub fn calc_block_level(
    header: &Header,
    max_block_level: BlockLevel
) -> BlockLevel