diff --git a/packages/beacon-node/test/spec/presets/operations.ts b/packages/beacon-node/test/spec/presets/operations.ts index 590ea476f98..8caab18d1c4 100644 --- a/packages/beacon-node/test/spec/presets/operations.ts +++ b/packages/beacon-node/test/spec/presets/operations.ts @@ -91,7 +91,9 @@ export const operations: TestRunnerFn = return { testFunction: (testcase) => { const state = testcase.pre.clone(); - const cachedState = createCachedBeaconStateTest(state, getConfig(fork)); + const epoch = (state.fork as phase0.Fork).epoch; + const cachedState = createCachedBeaconStateTest(state, getConfig(fork, epoch)); + operationFn(cachedState, testcase); state.commit(); return state; @@ -117,9 +119,6 @@ export const operations: TestRunnerFn = expectFunc: (testCase, expected, actual) => { expectEqualBeaconState(fork, expected, actual); }, - shouldSkip: (_testcase, name, _index) => { - return !name.includes("voluntary_exit_with_previous_fork_version_is_before_fork_epoch__valid"); - }, }, }; }; diff --git a/packages/beacon-node/test/spec/utils/getConfig.ts b/packages/beacon-node/test/spec/utils/getConfig.ts index 7a626b7f21f..e1060a03309 100644 --- a/packages/beacon-node/test/spec/utils/getConfig.ts +++ b/packages/beacon-node/test/spec/utils/getConfig.ts @@ -4,16 +4,16 @@ import {IChainForkConfig, createIChainForkConfig} from "@lodestar/config"; /* eslint-disable @typescript-eslint/naming-convention */ -export function getConfig(fork: ForkName): IChainForkConfig { +export function getConfig(fork: ForkName, forkEpoch = 0): IChainForkConfig { switch (fork) { case ForkName.phase0: return config; case ForkName.altair: - return createIChainForkConfig({ALTAIR_FORK_EPOCH: 0}); + return createIChainForkConfig({ALTAIR_FORK_EPOCH: forkEpoch}); case ForkName.bellatrix: return createIChainForkConfig({ ALTAIR_FORK_EPOCH: 0, - BELLATRIX_FORK_EPOCH: 0, + BELLATRIX_FORK_EPOCH: forkEpoch, }); } } diff --git a/packages/beacon-node/test/spec/utils/specTestIterator.ts b/packages/beacon-node/test/spec/utils/specTestIterator.ts index ea5cb7f27eb..6802efc245f 100644 --- a/packages/beacon-node/test/spec/utils/specTestIterator.ts +++ b/packages/beacon-node/test/spec/utils/specTestIterator.ts @@ -58,7 +58,7 @@ export function specTestIterator(configName: string, testRunners: Record