Skip to content

Commit

Permalink
Fix previous fork version
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww committed Apr 6, 2023
1 parent 11842c9 commit d78c7ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/core/pyspec/eth2spec/test/helpers/fork_transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def do_fork(state, spec, post_spec, fork_epoch, with_block=True, sync_aggregate=
state = post_spec.upgrade_to_capella(state)
elif post_spec.fork == DENEB:
state = post_spec.upgrade_to_deneb(state)
elif post_spec.fork == EIP6110:
state = post_spec.upgrade_to_eip6110(state)

assert state.fork.epoch == fork_epoch

Expand All @@ -175,7 +177,7 @@ def do_fork(state, spec, post_spec, fork_epoch, with_block=True, sync_aggregate=
assert state.fork.previous_version == post_spec.config.CAPELLA_FORK_VERSION
assert state.fork.current_version == post_spec.config.DENEB_FORK_VERSION
elif post_spec.fork == EIP6110:
assert state.fork.previous_version == post_spec.config.CAPELLA_FORK_VERSION
assert state.fork.previous_version == post_spec.config.DENEB_FORK_VERSION
assert state.fork.current_version == post_spec.config.EIP6110_FORK_VERSION

if with_block:
Expand Down
2 changes: 1 addition & 1 deletion tests/core/pyspec/eth2spec/test/helpers/genesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def create_genesis_state(spec, validator_balances, activation_threshold):
previous_version = spec.config.CAPELLA_FORK_VERSION
current_version = spec.config.DENEB_FORK_VERSION
elif spec.fork == EIP6110:
previous_version = spec.config.CAPELLA_FORK_VERSION
previous_version = spec.config.DENEB_FORK_VERSION
current_version = spec.config.EIP6110_FORK_VERSION

state = spec.BeaconState(
Expand Down

0 comments on commit d78c7ad

Please sign in to comment.