mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 18:51:19 +00:00
add rlock (#10444)
This commit is contained in:
parent
56ab5872bb
commit
d4038fb752
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user