Skip to content

Commit

Permalink
bug fix in change
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Jun 8, 2023
1 parent 62a3d7d commit 3a0e1ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 2022/Q4/artifacts/PoS-pseudocode/PoS-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,8 @@ end_of_epoch()

var validator_stake = read_epoched_field(validators[validator_address].total_deltas, cur_epoch + offset, 0)
var slashable_stake = validator_stake - sum_post_bonds
var change = min{-slashable_stake, diff_slashed_amount}
var change = diff_slashed_amount
if (slashable_stake + diff_slashed_amount < 0) then change = -slashable_stake
update_total_deltas(validator_address, offset, change)
update_voting_power(validator_address, offset)

Expand Down

0 comments on commit 3a0e1ff

Please sign in to comment.