diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/BeaconStateBuilderCapella.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/BeaconStateBuilderCapella.java index b6af7a927eb..92eb12fd6c0 100644 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/BeaconStateBuilderCapella.java +++ b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/BeaconStateBuilderCapella.java @@ -127,7 +127,9 @@ protected void initDefaults() { schema.getInactivityScoresSchema(), defaultItemsInSSZLists); currentSyncCommittee = dataStructureUtil.randomSyncCommittee(); nextSyncCommittee = dataStructureUtil.randomSyncCommittee(); - latestExecutionPayloadHeader = dataStructureUtil.randomExecutionPayloadHeader(); + latestExecutionPayloadHeader = + dataStructureUtil.randomExecutionPayloadHeader( + dataStructureUtil.getSpec().forMilestone(SpecMilestone.CAPELLA)); this.nextWithdrawalIndex = UInt64.ZERO; this.nextWithdrawalValidatorIndex = diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/BeaconStateBuilderDeneb.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/BeaconStateBuilderDeneb.java index 42f34a63749..7623ad31580 100644 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/BeaconStateBuilderDeneb.java +++ b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/BeaconStateBuilderDeneb.java @@ -116,7 +116,9 @@ protected void initDefaults() { schema.getInactivityScoresSchema(), defaultItemsInSSZLists); currentSyncCommittee = dataStructureUtil.randomSyncCommittee(); nextSyncCommittee = dataStructureUtil.randomSyncCommittee(); - latestExecutionPayloadHeader = dataStructureUtil.randomExecutionPayloadHeader(); + latestExecutionPayloadHeader = + dataStructureUtil.randomExecutionPayloadHeader( + dataStructureUtil.getSpec().forMilestone(SpecMilestone.DENEB)); this.nextWithdrawalIndex = UInt64.ZERO; this.nextWithdrawalValidatorIndex = diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java index fdd7bde7cfb..faf6761f00c 100644 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java +++ b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java @@ -1080,7 +1080,7 @@ public BeaconBlockAndState randomBlockAndState(final BeaconState state) { private BeaconBlockAndState randomBlockAndState( final UInt64 slot, final BeaconState state, final Bytes32 parentRoot) { - final BeaconBlockBody body = randomBeaconBlockBody(); + final BeaconBlockBody body = randomBeaconBlockBody(slot); final UInt64 proposerIndex = UInt64.valueOf(randomPositiveInt()); final BeaconBlockHeader latestHeader = new BeaconBlockHeader(slot, proposerIndex, parentRoot, Bytes32.ZERO, body.hashTreeRoot()); @@ -1898,7 +1898,7 @@ public AnchorPoint randomAnchorPoint(final UInt64 epoch, final Fork currentFork) UInt64 slot = computeStartSlotAtEpoch(epoch); final BeaconBlockAndState blockAndState = randomBlockAndState( - slot, stateBuilderPhase0().slot(slot).fork(currentFork).build(), randomBytes32()); + slot, stateBuilderDeneb().slot(slot).fork(currentFork).build(), randomBytes32()); return AnchorPoint.fromInitialBlockAndState(spec, toSigned(blockAndState)); }