mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-20 15:38:55 +00:00
Fix test_override_config_fork_epoch
This commit is contained in:
parent
ec980dae4c
commit
5356fee282
@ -1,8 +1,10 @@
|
||||
from eth2spec.test.context import (
|
||||
is_post_capella,
|
||||
is_post_eip4844,
|
||||
spec_configured_state_test,
|
||||
spec_state_test_with_matching_config,
|
||||
with_all_phases,
|
||||
with_phases
|
||||
with_phases,
|
||||
)
|
||||
from eth2spec.test.helpers.constants import ALTAIR
|
||||
|
||||
@ -38,9 +40,15 @@ def test_override_config_fork_epoch(spec, state):
|
||||
if state.fork.current_version == spec.config.BELLATRIX_FORK_VERSION:
|
||||
return
|
||||
|
||||
assert spec.config.CAPELLA_FORK_EPOCH == spec.GENESIS_EPOCH
|
||||
if state.fork.current_version == spec.config.CAPELLA_FORK_VERSION:
|
||||
return
|
||||
if is_post_capella(spec):
|
||||
assert spec.config.CAPELLA_FORK_EPOCH == spec.GENESIS_EPOCH
|
||||
if state.fork.current_version == spec.config.CAPELLA_FORK_VERSION:
|
||||
return
|
||||
|
||||
if is_post_eip4844(spec):
|
||||
assert spec.config.EIP4844_FORK_EPOCH == spec.GENESIS_EPOCH
|
||||
if state.fork.current_version == spec.config.EIP4844_FORK_VERSION:
|
||||
return
|
||||
|
||||
assert spec.config.SHARDING_FORK_EPOCH == spec.GENESIS_EPOCH
|
||||
if state.fork.current_version == spec.config.SHARDING_FORK_VERSION:
|
||||
|
@ -596,6 +596,10 @@ def is_post_capella(spec):
|
||||
return spec.fork == CAPELLA
|
||||
|
||||
|
||||
def is_post_eip4844(spec):
|
||||
return spec.fork == EIP4844
|
||||
|
||||
|
||||
with_altair_and_later = with_all_phases_except([PHASE0])
|
||||
with_bellatrix_and_later = with_all_phases_except([PHASE0, ALTAIR])
|
||||
with_capella_and_later = with_all_phases_except([PHASE0, ALTAIR, BELLATRIX, EIP4844])
|
||||
|
Loading…
x
Reference in New Issue
Block a user