mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-17 21:16:52 +00:00
Update specs/core/0_beacon-chain.md
Co-Authored-By: djrtwo <dannyjryan@gmail.com>
This commit is contained in:
parent
0656817346
commit
3c8d1b23a5
@ -691,6 +691,7 @@ def slot_to_epoch(slot: Slot) -> Epoch:
|
|||||||
def get_previous_epoch(state: BeaconState) -> Epoch:
|
def get_previous_epoch(state: BeaconState) -> Epoch:
|
||||||
"""`
|
"""`
|
||||||
Return the previous epoch of the given ``state``.
|
Return the previous epoch of the given ``state``.
|
||||||
|
Return the current epoch if it's genesis epoch.
|
||||||
"""
|
"""
|
||||||
current_epoch = get_current_epoch(state)
|
current_epoch = get_current_epoch(state)
|
||||||
return (current_epoch - 1) if current_epoch > GENESIS_EPOCH else current_epoch
|
return (current_epoch - 1) if current_epoch > GENESIS_EPOCH else current_epoch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user