This commit is contained in:
Rigel 2018-10-19 14:58:37 -04:00 committed by Christopher Goes
parent 22cb6983b7
commit d9916f99eb
1 changed files with 1 additions and 3 deletions

View File

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