Skip to content

Commit

Permalink
add pool check
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Aug 20, 2024
1 parent 888986e commit dccf86a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/distribution/keeper/allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ func (k Keeper) AllocateTokens(ctx context.Context, totalPreviousPower int64, bo
poolReward := feesCollected.MulDecTruncate(voteMultiplier).MulDecTruncate(poolFraction)

poolDenom := rewardWeight.Denom
poolSize := bondedTokensSum[poolDenom]
poolSize, ok := bondedTokensSum[poolDenom]

// if poolSize is zero, skip allocation and then the poolReward will be allocated to community pool
if poolSize.IsZero() {
if !ok || poolSize.IsZero() {
continue
}

Expand Down

0 comments on commit dccf86a

Please sign in to comment.