Skip to content

Commit

Permalink
fix test compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Nov 17, 2024
1 parent adfd8c5 commit 9bc311b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class ManualReferenceTestRunner extends Eth2ReferenceTestCase {
*
* <p>May be overridden by the ENV_DISPLAY_NAME environment variable.
*/
private static final String DISPLAY_NAME = "";
private static final String DISPLAY_NAME = "fork_next_epoch_with_block";

@ParameterizedTest(name = "{0}")
@MethodSource("loadReferenceTests")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package tech.pegasys.teku.reference.altair.fork;

import static tech.pegasys.teku.infrastructure.ssz.SszDataAssert.assertThatSszData;
import static tech.pegasys.teku.spec.SpecMilestone.BELLATRIX;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -44,23 +45,26 @@ public void runTest(final TestDefinition testDefinition) throws Throwable {
}

private void processUpgrade(final TestDefinition testDefinition, final SpecMilestone milestone) {
final SpecVersion spec = testDefinition.getSpec().getGenesisSpec();
final SpecMilestone previousMilestone = milestone.getPreviousMilestone();
final SpecVersion previousMilestoneSpecVersion =
testDefinition.getSpec().forMilestone(previousMilestone);
final BeaconStateSchema<?, ?> fromMilestoneSchema =
switch (milestone) {
case ALTAIR -> BeaconStateSchemaPhase0.create(spec.getConfig());
case BELLATRIX -> BeaconStateSchemaAltair.create(spec.getConfig());
case ALTAIR -> BeaconStateSchemaPhase0.create(previousMilestoneSpecVersion.getConfig());
case BELLATRIX ->
BeaconStateSchemaAltair.create(previousMilestoneSpecVersion.getConfig());
case CAPELLA ->
BeaconStateSchemaBellatrix.create(
spec.getConfig(),
testDefinition.getSpec().getGenesisSchemaDefinitions().getSchemaRegistry());
previousMilestoneSpecVersion.getConfig(),
previousMilestoneSpecVersion.getSchemaDefinitions().getSchemaRegistry());
case DENEB ->
BeaconStateSchemaCapella.create(
spec.getConfig(),
testDefinition.getSpec().getGenesisSchemaDefinitions().getSchemaRegistry());
previousMilestoneSpecVersion.getConfig(),
previousMilestoneSpecVersion.getSchemaDefinitions().getSchemaRegistry());
case ELECTRA ->
BeaconStateSchemaDeneb.create(
spec.getConfig(),
testDefinition.getSpec().getGenesisSchemaDefinitions().getSchemaRegistry());
previousMilestoneSpecVersion.getConfig(),
previousMilestoneSpecVersion.getSchemaDefinitions().getSchemaRegistry());
default ->
throw new IllegalStateException(
"Unhandled fork upgrade for test "
Expand Down

0 comments on commit 9bc311b

Please sign in to comment.