Skip to content

Commit

Permalink
bugfix (#2535)
Browse files Browse the repository at this point in the history
  • Loading branch information
rigelrozanski authored and cwgoes committed Oct 19, 2018
1 parent 22cb698 commit d9916f9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions x/distribution/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ func (k Keeper) getDelegatorRewardsAll(ctx sdk.Context, delAddr sdk.AccAddress,

withdraw := types.DecCoins{}
bondedTokens := k.stakeKeeper.TotalPower(ctx)
feePool := k.GetFeePool(ctx)

// iterate over all the delegations
operationAtDelegation := func(_ int64, del sdk.Delegation) (stop bool) {
feePool := k.GetFeePool(ctx)
valAddr := del.GetValidator()
delInfo := k.GetDelegationDistInfo(ctx, delAddr, valAddr)
valInfo := k.GetValidatorDistInfo(ctx, valAddr)
Expand All @@ -142,7 +142,5 @@ func (k Keeper) getDelegatorRewardsAll(ctx sdk.Context, delAddr sdk.AccAddress,
return false
}
k.stakeKeeper.IterateDelegations(ctx, delAddr, operationAtDelegation)

k.SetFeePool(ctx, feePool)
return withdraw
}

0 comments on commit d9916f9

Please sign in to comment.