Skip to content

Commit

Permalink
fix: validator monitor summaries should not render during epoch 0 (#6791
Browse files Browse the repository at this point in the history
)

Skip render summary at epoch 0
  • Loading branch information
ensi321 authored May 16, 2024
1 parent 229182e commit b0ff1a0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/beacon-node/src/metrics/validatorMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,14 @@ export function createValidatorMonitor(
}

// Compute summaries of previous epoch attestation performance
const prevEpoch = Math.max(0, computeEpochAtSlot(headState.slot) - 1);
const prevEpoch = computeEpochAtSlot(headState.slot) - 1;

// During the end of first epoch, the prev epoch with be -1
// Skip this as there is no attestation and block proposal summary in epoch -1
if (prevEpoch === -1) {
return;
}

const rootCache = new RootHexCache(headState);

if (config.getForkSeq(headState.slot) >= ForkSeq.altair) {
Expand Down

0 comments on commit b0ff1a0

Please sign in to comment.