debugging simulation

This commit is contained in:
rigelrozanski
2018-10-05 20:32:06 -04:00
parent 83c2781c1c
commit e304b9c600
16 changed files with 97 additions and 56 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
The pool of a new delegator bond will be 0 for the height at which the bond was
added, or the withdrawal has taken place. This is achieved by setting
`DelegatorDistInfo.WithdrawalHeight` to the height of the triggering transaction.
`DelegationDistInfo.WithdrawalHeight` to the height of the triggering transaction.
## Commission rate change
+2 -2
View File
@@ -59,10 +59,10 @@ properties change (aka bonded tokens etc.) its properties will remain constant
and the delegator's _accumulation_ factor can be calculated passively knowing
only the height of the last withdrawal and its current properties.
- DelegatorDistInfo: ` 0x02 | DelegatorAddr | ValOperatorAddr -> amino(delegatorDist)`
- DelegationDistInfo: ` 0x02 | DelegatorAddr | ValOperatorAddr -> amino(delegatorDist)`
```golang
type DelegatorDistInfo struct {
type DelegationDistInfo struct {
WithdrawalHeight int64 // last time this delegation withdrew rewards
}
```
+2 -2
View File
@@ -172,9 +172,9 @@ For delegations (including validator's self-delegation) all rewards from reward
pool have already had the validator's commission taken away.
```
func (di DelegatorDistInfo) WithdrawRewards(g FeePool, vi ValidatorDistInfo,
func (di DelegationDistInfo) WithdrawRewards(g FeePool, vi ValidatorDistInfo,
height int64, totalBonded, vdTokens, totalDelShares, commissionRate Dec) (
di DelegatorDistInfo, g FeePool, withdrawn DecCoins)
di DelegationDistInfo, g FeePool, withdrawn DecCoins)
vi.UpdateTotalDelAccum(height, totalDelShares)
g = vi.TakeFeePoolRewards(g, height, totalBonded, vdTokens, commissionRate)