Skip to content

Commit

Permalink
Fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Dec 10, 2024
1 parent b010dc9 commit faacc3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import tech.pegasys.teku.spec.datastructures.state.beaconstate.MutableBeaconState;
import tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.eip7732.BeaconStateSchemaEip7732;
import tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.eip7732.MutableBeaconStateEip7732;
import tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.electra.BeaconStateSchemaElectra;

public class BeaconStateEip7732 extends BeaconStateAltair {

Expand Down Expand Up @@ -242,13 +241,13 @@ protected void applyAdditionalFields(
BeaconStateSchemaEip7732.required(
mutableBeaconStateEip7732.getBeaconStateSchema())
.getHistoricalSummariesSchema(),
BeaconStateSchemaElectra.required(
BeaconStateSchemaEip7732.required(
mutableBeaconStateEip7732.getBeaconStateSchema())
.getPendingDepositsSchema(),
BeaconStateSchemaElectra.required(
BeaconStateSchemaEip7732.required(
mutableBeaconStateEip7732.getBeaconStateSchema())
.getPendingPartialWithdrawalsSchema(),
BeaconStateSchemaElectra.required(
BeaconStateSchemaEip7732.required(
mutableBeaconStateEip7732.getBeaconStateSchema())
.getPendingConsolidationsSchema(),
this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package tech.pegasys.teku.spec.config;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static tech.pegasys.teku.spec.SpecMilestone.ELECTRA;
import static tech.pegasys.teku.spec.SpecMilestone.EIP7732;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
Expand All @@ -33,6 +33,7 @@
import tech.pegasys.teku.spec.config.builder.BellatrixBuilder;
import tech.pegasys.teku.spec.config.builder.CapellaBuilder;
import tech.pegasys.teku.spec.config.builder.DenebBuilder;
import tech.pegasys.teku.spec.config.builder.Eip7732Builder;
import tech.pegasys.teku.spec.config.builder.ElectraBuilder;
import tech.pegasys.teku.spec.config.builder.SpecConfigBuilder;
import tech.pegasys.teku.spec.datastructures.util.ForkAndSpecMilestone;
Expand All @@ -49,7 +50,8 @@ class SpecConfigBuilderTest {
BellatrixBuilder.class,
CapellaBuilder.class,
DenebBuilder.class,
ElectraBuilder.class);
ElectraBuilder.class,
Eip7732Builder.class);

/**
* Ensures Builders have actually non-primitive setters, because primitive setters are silently
Expand Down Expand Up @@ -113,8 +115,8 @@ public void shouldCreateSpecVersionWithEffectiveSpecConfigVersion() {
public void shouldCreateSpecExposingNonActiveConfig() {
// we will need to update this when we schedule ELECTRA on mainnet
final Spec spec = getSpec(__ -> {});
assertThat(spec.getForkSchedule().getHighestSupportedMilestone()).isNotEqualTo(ELECTRA);
assertThat(spec.getSpecConfigAndParent().specConfig().getMilestone()).isEqualTo(ELECTRA);
assertThat(spec.getForkSchedule().getHighestSupportedMilestone()).isNotEqualTo(EIP7732);
assertThat(spec.getSpecConfigAndParent().specConfig().getMilestone()).isEqualTo(EIP7732);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public static void assertStoresMatch(
"epochStatesCountGauge",
"blobSidecars",
"blobSidecarsBlocksCountGauge",
"executionPayloadStates")
"executionPayloadStates",
"ptcVote")
.isEqualTo(expectedState);
assertThat(actualState.getOrderedBlockRoots())
.containsExactlyElementsOf(expectedState.getOrderedBlockRoots());
Expand Down

0 comments on commit faacc3c

Please sign in to comment.