Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Apr 10, 2024
1 parent 6a5b007 commit ce6b258
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 2 additions & 6 deletions ethereum/spec/src/main/java/tech/pegasys/teku/spec/Spec.java
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,8 @@ public UInt64 computeEpochAtSlot(final UInt64 slot) {
return atSlot(slot).miscHelpers().computeEpochAtSlot(slot);
}

public UInt64 computeTimeAtSlot(final BeaconState state, final UInt64 slot) {
return computeTimeAtSlot(state.getGenesisTime(), slot);
}

public UInt64 computeTimeAtSlot(final UInt64 genesisTime, final UInt64 slot) {
return atSlot(slot).miscHelpers().computeTimeAtSlot(genesisTime, slot);
public UInt64 computeTimeAtSlot(BeaconState state, UInt64 slot) {
return atSlot(slot).miscHelpers().computeTimeAtSlot(state.getGenesisTime(), slot);
}

public Bytes computeSigningRoot(BeaconBlock block, Bytes32 domain) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,7 @@ public void initValidatorApiHandler() {
final BlockProductionAndPublishingPerformanceFactory blockProductionPerformanceFactory =
new BlockProductionAndPublishingPerformanceFactory(
timeProvider,
(slot) ->
secondsToMillis(spec.computeTimeAtSlot(recentChainData.getGenesisTime(), slot)),
(slot) -> secondsToMillis(recentChainData.computeTimeAtSlot(slot)),
beaconConfig.getMetricsConfig().isBlockProductionAndPublishingPerformanceEnabled(),
beaconConfig.getMetricsConfig().getBlockProductionPerformanceWarningThreshold(),
beaconConfig.getMetricsConfig().getBlockPublishingPerformanceWarningThreshold());
Expand Down

0 comments on commit ce6b258

Please sign in to comment.