Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove conditionals from
epoch_from_block_number
Upon analyzing the conditional logic of the `epoch_from_block_height` it seems that we really want the epoch to increase on the successor of the multiples of the `epoch_height`. The conditional branches make this less obvious with 3 separate computed results for the calculation. It seems that this can be achieved with a single statement. In addition, extra clarity as to the parameter's intents can be added by renaming `epoch_height` to something that indicates what the parameter is symbolizing.
- Loading branch information