Skip to content

Commit

Permalink
Use total rewards for circulation
Browse files Browse the repository at this point in the history
  • Loading branch information
kacpersaw committed Nov 8, 2023
1 parent cd05910 commit 0a60e36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions history/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ func (h *History) pushStatistics() {
message.Layer = h.storage.GetLastLayer(h.ctx)
message.Epoch = message.Layer / h.storage.NetworkInfo.EpochNumLayers

circulation, _ := h.storage.GetCirculation(h.ctx)
epochs, err := h.storage.GetEpochsData(h.ctx, &bson.D{}, options.Find().SetSort(bson.D{{"number", -1}}).SetLimit(api.PointsCount).SetProjection(bson.D{{"_id", 0}}))

if err == nil && len(epochs) > 0 {
Expand All @@ -154,7 +153,7 @@ func (h *History) pushStatistics() {
message.Accounts[i].Amt = epoch.Stats.Current.Accounts
message.Accounts[i].Epoch = epoch.Number
message.Accounts[i].Age = age
message.Circulation[i].Amt = circulation
message.Circulation[i].Amt = epoch.Stats.Current.Rewards
message.Circulation[i].Epoch = epoch.Number
message.Circulation[i].Age = age
message.Rewards[i].Amt = epoch.Stats.Current.Rewards
Expand Down

0 comments on commit 0a60e36

Please sign in to comment.