Skip to content

Commit

Permalink
Fix exception in DAS code when DAS epoch wasn't activated yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashatyrev committed Nov 6, 2024
1 parent 3250a37 commit 476624e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import tech.pegasys.teku.spec.datastructures.blocks.SlotAndBlockRoot;
import tech.pegasys.teku.spec.datastructures.state.Checkpoint;
import tech.pegasys.teku.spec.datastructures.util.DataColumnSlotAndIdentifier;
import tech.pegasys.teku.spec.logic.versions.eip7594.helpers.MiscHelpersEip7594;
import tech.pegasys.teku.statetransition.datacolumns.db.DataColumnSidecarDbAccessor;
import tech.pegasys.teku.storage.api.FinalizedCheckpointChannel;

Expand Down Expand Up @@ -116,8 +115,11 @@ private List<UInt64> getCustodyColumnsForSlot(UInt64 slot) {
}

private List<UInt64> getCustodyColumnsForEpoch(UInt64 epoch) {
return MiscHelpersEip7594.required(spec.atEpoch(epoch).miscHelpers())
.computeCustodyColumnIndexes(nodeId, totalCustodySubnetCount);
return spec.atEpoch(epoch)
.miscHelpers()
.toVersionEip7594()
.map(misc -> misc.computeCustodyColumnIndexes(nodeId, totalCustodySubnetCount))
.orElse(List.of());
}

@Override
Expand Down

0 comments on commit 476624e

Please sign in to comment.