Merge pull request #2355 from ericsson49/ericsson49/fix_upgrade_to_altair

Fix: `upgrade_to_altair` should use `phase0.get_current_epoch`
This commit is contained in:
Diederik Loerakker
2021-04-26 20:34:33 +02:00
committed by GitHub

View File

@@ -40,7 +40,7 @@ After `process_slots` of Phase 0 finishes, if `state.slot % SLOTS_PER_EPOCH == 0
```python
def upgrade_to_altair(pre: phase0.BeaconState) -> BeaconState:
epoch = get_current_epoch(pre)
epoch = phase0.get_current_epoch(pre)
post = BeaconState(
# Versioning
genesis_time=pre.genesis_time,