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:
|
||||
"""`
|
||||
Return the previous epoch of the given ``state``.
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue