Summary
We are using a hack for representing a null block index by doing:
|
impl BlockIdx { |
|
pub const NULL: Self = Self::new(u32::MAX); |
I think it would be better to remove this hack and using a proper Option<BlockIdx> for representing Some(BlockIdx) or a None it would ensure a proper care for a None/Some cases instead of using an if condition (which is more error prone) like:
if target == BlockIdx::NULL {
...
} else {
...
}