Module utils

Module utils 

Source
Expand description

Utility functions for consensus.

Functionsยง

epoch
Returns the epoch the given height belongs to.
is_last_block_in_epoch
Returns Some(epoch) if the height is the last block in the epoch, None otherwise.
last_block_in_epoch
Returns the last block height for the given epoch.
relative_height_in_epoch
Returns the position of height within its epoch (starting at zero).