mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 16:08:26 -05:00
Fix Div By 0 in Small Helper (#11390)
This commit is contained in:
@@ -113,6 +113,9 @@ func (s *Service) updateMetrics() {
|
||||
}
|
||||
|
||||
func average(xs []float64) float64 {
|
||||
if len(xs) == 0 {
|
||||
return 0
|
||||
}
|
||||
total := 0.0
|
||||
for _, v := range xs {
|
||||
total += v
|
||||
|
||||
Reference in New Issue
Block a user