Update 0_beacon-chain.md

This commit is contained in:
Justin 2019-05-17 06:11:39 -04:00 committed by GitHub
parent f19188816b
commit 694b31b934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -647,7 +647,7 @@ def get_previous_epoch(state: BeaconState) -> Epoch:
Return the current epoch if it's genesis epoch.
"""
current_epoch = get_current_epoch(state)
return (current_epoch - 1) if current_epoch > GENESIS_EPOCH else current_epoch
return GENESIS_EPOCH if current_epoch == GENESIS_EPOCH else current_epoch - 1
```
### `get_current_epoch`