Skip to content

Commit

Permalink
CNS-870: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oren-lava committed Feb 26, 2024
1 parent e1da79c commit a4062fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions x/rewards/keeper/iprpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (k Keeper) addSpecFunds(ctx sdk.Context, spec string, fund sdk.Coins, durat
if iprpcReward.SpecFunds[i].Spec == spec {
specFound = true
iprpcReward.SpecFunds[i].Fund = iprpcReward.SpecFunds[i].Fund.Add(fund...)
break
}
}
if !specFound {
Expand Down
10 changes: 5 additions & 5 deletions x/rewards/keeper/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ func (k Keeper) distributeMonthlyBonusRewards(ctx sdk.Context) {
specTotalPayout = k.specTotalPayout(ctx, total, sdk.NewDecFromInt(totalbasepay), spec)
}
// distribute the rewards to all providers
if !specTotalPayout.IsZero() {
for _, basepay := range basepays {
for _, basepay := range basepays {
if !specTotalPayout.IsZero() {
// calculate the providers bonus base on adjusted base pay
reward := specTotalPayout.Mul(basepay.TotalAdjusted).QuoInt(totalbasepay).TruncateInt()
totalRewarded = totalRewarded.Add(reward)
Expand All @@ -90,10 +90,10 @@ func (k Keeper) distributeMonthlyBonusRewards(ctx sdk.Context) {
}

details[providerAddr.String()+" "+spec.ChainID] = reward.String()

// count iprpc cu
k.countIprpcCu(specCuMap, basepay.IprpcCu, spec.ChainID, basepay.Provider)
}

// count iprpc cu
k.countIprpcCu(specCuMap, basepay.IprpcCu, spec.ChainID, basepay.Provider)
}
}

Expand Down

0 comments on commit a4062fe

Please sign in to comment.