Skip to content

Commit

Permalink
Fixes some fixtures building for Capella and Deneb
Browse files Browse the repository at this point in the history
  • Loading branch information
zilm13 committed Sep 19, 2023
1 parent db94bcc commit 3930351
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit 3930351

Please sign in to comment.