pub fn option_epoch_from_block_number<TYPES: NodeType>(
with_epoch: bool,
block_number: u64,
epoch_height: u64,
) -> Option<TYPES::Epoch>
Expand description
Returns an Option<Epoch>
based on a boolean condition of whether or not epochs are enabled, a block number,
and the epoch height. If epochs are disabled or the epoch height is zero, returns None.