From b2822d0b6678494c4afb6c169a5c5ff3763a1ec4 Mon Sep 17 00:00:00 2001 From: cortze Date: Wed, 4 May 2022 12:27:17 +0200 Subject: [PATCH] Fix error not saving newer metrics with sync map --- pkg/analyzer/analyzer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/analyzer/analyzer.go b/pkg/analyzer/analyzer.go index 0b22a01b..a19c7fb6 100644 --- a/pkg/analyzer/analyzer.go +++ b/pkg/analyzer/analyzer.go @@ -205,6 +205,9 @@ func (s *StateAnalyzer) Run() { if err != nil { log.Errorf("unable to calculate the performance for validator %d on slot %d. %s", task.ValIdx, task.Slot, err.Error()) } + // save the calculated rewards on the the list of items + fmt.Println(met) + s.Metrics.Store(task.ValIdx, met) } }()