Skip to content

Commit

Permalink
spec/pos/reward: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Sep 9, 2022
1 parent a097813 commit 556bc62
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ updateProducts
-> HashMap<BondId, Token::amount>>
updateProducts validatorProducts activeSet currentEpoch =
let stake = PoS.readValidatorTotalDeltas validator currentEpoch
reward = PoS.reward stake currentEpoch
entries = lookup validatorProducts validator
lastProduct = lookup entries (Epoch (currentEpoch - 1))
in insert currentEpoch (product*(1+rsratio)) entries
let stake = PoS.readValidatorTotalDeltas validator currentEpoch
reward = PoS.reward stake currentEpoch
rsratio = reward / stake
entries = lookup validatorProducts validator
lastProduct = lookup entries (Epoch (currentEpoch - 1))
in insert currentEpoch (lastProduct*(1+rsratio)) entries
```


Expand Down

0 comments on commit 556bc62

Please sign in to comment.