fix preivous_epoch_start_slot to be based upon GENESIS_SLOT

This commit is contained in:
Danny Ryan 2019-01-25 17:26:27 -07:00 committed by GitHub
parent 6f830179c6
commit e34cfc8de8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1591,7 +1591,7 @@ The steps below happen when `state.slot % EPOCH_LENGTH == EPOCH_LENGTH - 1`.
* Let `next_epoch_start_slot = state.slot + 1`.
* Let `current_epoch_start_slot = state.slot - (EPOCH_LENGTH + 1)`.
* Let `previous_epoch_start_slot = state.slot - 2 * EPOCH_LENGTH + 1` if `state.slot > EPOCH_LENGTH` else `current_epoch_start_slot`.
* Let `previous_epoch_start_slot = state.slot - 2 * EPOCH_LENGTH + 1` if `state.slot > GENESIS_SLOT + EPOCH_LENGTH` else `current_epoch_start_slot`.
* Let `next_epoch = next_epoch_start_slot // EPOCH_LENGTH`.
* Let `current_epoch = current_epoch_start_slot // EPOCH_LENGTH`.