Skip to content

Commit

Permalink
improve logging in rewards keeper
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding committed Nov 10, 2023
1 parent a1ad1de commit cf09fde
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions protocol/x/rewards/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,6 @@ func (k Keeper) ProcessRewardsForBlock(
tokensToDistribute := lib.BigMin(rewardTokenBalance.Amount.BigInt(), bigIntRewardTokenAmount)
// Measure distributed token amount.

k.Logger(ctx).Info(fmt.Sprintf(
"Tokens to distribute: %v", tokensToDistribute),
metrics.BlockHeight,
ctx.BlockHeight(),
)

telemetry.SetGauge(
metrics.GetMetricValueFromBigInt(tokensToDistribute),
types.ModuleName,
Expand Down Expand Up @@ -366,5 +360,11 @@ func (k Keeper) ProcessRewardsForBlock(
metrics.TreasuryBalanceAfterDistribution,
)

k.Logger(ctx).Info(fmt.Sprintf(
"Tokens distributed: %v, remaining treasuryBalance: %v", tokensToDistribute, remainingTreasuryBalance.Amount),
metrics.BlockHeight,
ctx.BlockHeight(),
)

return nil
}

0 comments on commit cf09fde

Please sign in to comment.