Skip to content

Commit

Permalink
Fix epoch smeshers stats
Browse files Browse the repository at this point in the history
  • Loading branch information
kacpersaw committed Jul 16, 2024
1 parent 8a96b27 commit bed1287
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/storage/storagereader/epochs.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func (s *Reader) GetEpochs(ctx context.Context, query *bson.D, opts ...*options.
epoch.Stats.Current.RewardsNumber = count
epoch.Stats.Cumulative.Rewards = total
epoch.Stats.Cumulative.RewardsNumber = count

atxCount, err := s.CountActivations(context.Background(), &bson.D{{Key: "targetEpoch", Value: epoch.Number}})

Check failure on line 45 in internal/storage/storagereader/epochs.go

View workflow job for this annotation

GitHub Actions / lint

ineffectual assignment to err (ineffassign)
epoch.Stats.Current.Smeshers = atxCount
}

return epochs, nil
Expand Down Expand Up @@ -69,5 +72,9 @@ func (s *Reader) GetEpoch(ctx context.Context, epochNumber int) (*model.Epoch, e
epoch.Stats.Cumulative.Rewards = total
epoch.Stats.Cumulative.RewardsNumber = count

atxCount, err := s.CountActivations(context.Background(), &bson.D{{Key: "targetEpoch", Value: epoch.Number}})

Check failure on line 75 in internal/storage/storagereader/epochs.go

View workflow job for this annotation

GitHub Actions / lint

ineffectual assignment to err (ineffassign)
epoch.Stats.Current.Smeshers = atxCount
epoch.Stats.Cumulative.Smeshers = atxCount

return epoch, nil
}

0 comments on commit bed1287

Please sign in to comment.