This commit is contained in:
Nishant Das 2022-03-29 21:55:41 +08:00 committed by GitHub
parent 56ab5872bb
commit d4038fb752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -447,10 +447,12 @@ func (v *validator) UpdateLogAggregateStats(resp *ethpb.ValidatorPerformanceResp
log.WithFields(epochSummaryFields).Info("Previous epoch aggregated voting summary")
var totalStartBal, totalPrevBal uint64
v.prevBalanceLock.RLock()
for i, val := range v.startBalances {
totalStartBal += val
totalPrevBal += v.prevBalance[i]
}
v.prevBalanceLock.RUnlock()
if totalStartBal == 0 || summary.totalAttestedCount == 0 {
log.Error("Failed to print launch summary: one or more divisors is 0")