This commit is contained in:
Danny Ryan 2021-12-01 16:42:12 -07:00
parent b7308e0953
commit 78d55839b9
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
3 changed files with 6 additions and 2 deletions

View File

@ -1 +0,0 @@
from . import mainnet as spec # noqa:F401

View File

@ -12,6 +12,7 @@ from eth2spec.test.helpers.block import (
from eth2spec.test.helpers.constants import (
ALTAIR,
MERGE,
CAPELLA,
)
from eth2spec.test.helpers.deposits import (
prepare_state_and_deposit,
@ -147,6 +148,8 @@ def do_fork(state, spec, post_spec, fork_epoch, with_block=True, operation_dict=
state = post_spec.upgrade_to_altair(state)
elif post_spec.fork == MERGE:
state = post_spec.upgrade_to_merge(state)
elif post_spec.fork == CAPELLA:
state = post_spec.upgrade_to_capella(state)
assert state.fork.epoch == fork_epoch
@ -156,6 +159,9 @@ def do_fork(state, spec, post_spec, fork_epoch, with_block=True, operation_dict=
elif post_spec.fork == MERGE:
assert state.fork.previous_version == post_spec.config.ALTAIR_FORK_VERSION
assert state.fork.current_version == post_spec.config.MERGE_FORK_VERSION
elif post_spec.fork == CAPELLA:
assert state.fork.previous_version == post_spec.config.MERGE_FORK_VERSION
assert state.fork.current_version == post_spec.config.CAPELLA_FORK_VERSION
if with_block:
return state, _state_transition_and_sign_block_at_slot(post_spec, state, operation_dict=operation_dict)

View File

@ -1 +0,0 @@
from . import mainnet as spec # noqa:F401