is_last_block_in_epoch

Function is_last_block_in_epoch 

Source
pub fn is_last_block_in_epoch(epoch_length: u64, height: u64) -> Option<Epoch>
Expand description

Returns Some(epoch) if the height is the last block in the epoch, None otherwise.

Epoch length is defined in number of blocks. Panics if epoch_length is zero.