Module epoch

Module epoch 

Source
Expand description

Epoch logic used by tempo.

All logic is written with the assumption that there are at least 3 heights per epoch. Having less heights per epoch will not immediately break the logic, but it might lead to strange behavior and is not supported.

Note that either way, 3 blocks per epoch is a highly unreasonable number.

Modulesยง

manager ๐Ÿ”’
scheme_provider ๐Ÿ”’
Epoch aware schemes and peers.

Enumsยง

RelativePosition ๐Ÿ”’
The relative position of in an epoch.

Functionsยง

is_first_block_in_epoch ๐Ÿ”’
Returns Some(epoch) if height is the last block in an epoch of epoch_length.
relative_position ๐Ÿ”’
Returns the relative position of height in an epoch given epoch_length.