Skip to content

Commit

Permalink
Validator logging: return early if no att included (#7979)
Browse files Browse the repository at this point in the history
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
  • Loading branch information
terencechain and rauljordan committed Nov 30, 2020
1 parent 3af7809 commit ea10784
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions validator/client/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ func (v *validator) UpdateLogAggregateStats(resp *ethpb.ValidatorPerformanceResp
}
}

// Return early if no attestation got included from previous epoch.
// This happens when validators joined half way through epoch and already passed its assigned slot.
if included == 0 {
return
}

summary.totalAttestedCount += uint64(len(resp.InclusionSlots))
summary.totalSources += included
summary.totalTargets += included
Expand Down

0 comments on commit ea10784

Please sign in to comment.