Skip to content

Commit

Permalink
Merge PR #2891: Remove redundant temporary code remDelPool when calc …
Browse files Browse the repository at this point in the history
…DelPool
  • Loading branch information
dongsam authored and cwgoes committed Nov 23, 2018
1 parent f09fa33 commit 33d64b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions x/distribution/types/delegator_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ func (di DelegationDistInfo) WithdrawRewards(wc WithdrawContext, vi ValidatorDis
accum := di.GetDelAccum(wc.Height, delegatorShares)
di.DelPoolWithdrawalHeight = wc.Height
withdrawalTokens := vi.DelPool.MulDec(accum).QuoDec(vi.DelAccum.Accum)
remDelPool := vi.DelPool.Minus(withdrawalTokens)

vi.DelPool = remDelPool
vi.DelPool = vi.DelPool.Minus(withdrawalTokens)
vi.DelAccum.Accum = vi.DelAccum.Accum.Sub(accum)

return di, vi, fp, withdrawalTokens
Expand Down

0 comments on commit 33d64b6

Please sign in to comment.