Skip to content

Commit

Permalink
chore(stats): properly count the number of keys in the reports table …
Browse files Browse the repository at this point in the history
…before marking gateway as failed
  • Loading branch information
dtfiedler committed Jul 16, 2024
1 parent be2e1de commit a844005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/epochs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ function epochs.distributeRewardsForEpoch(currentTimestamp)
local totalEligibleRewards = math.floor(balances.getBalance(ao.id) * epochs.getSettings().rewardPercentage)
local gatewayReward = math.floor(totalEligibleRewards * 0.95 / #activeGatewayAddresses)
local observerReward = math.floor(totalEligibleRewards * 0.05 / #prescribedObservers)
local totalObservationsSubmitted = #epoch.observations.reports or 0
local totalObservationsSubmitted = utils.lengthOfTable(epoch.observations.reports) or 0

-- check if already distributed rewards for epoch
if epoch.distributions.distributedTimestamp then
Expand Down

0 comments on commit a844005

Please sign in to comment.