mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
* set the accum of a new validator to (-total voting power): - disincentivize validators to unbond, then rebon to reset their negative Accum to zero additional unrelated changes: - do not capitalize error msgs - fix typo * review comments: (re)capitalize errors & delete obsolete comments * More changes suggested by @melekes * WIP: do not batch clip (#2809) * substract avgAccum on each iteration - temporarily skip test * remove unused method safeMulClip / safeMul * always substract the avg accum - temp. skip another test * remove overflow / underflow tests & add tests for avgAccum: - add test for computeAvgAccum - as we substract the avgAccum now we will not trivially over/underflow * address @cwgoes' comments * shift by avg at the end of IncrementAccum * Add comment to MaxTotalVotingPower * Guard inputs to not exceed MaxTotalVotingPower * Address review comments: - do not fetch current validator from set again - update error message * Address a few review comments: - fix typo - extract variable * address more review comments: - clarify 1.125*totalVotingPower == totalVotingPower + (totalVotingPower >> 3) * review comments: panic instead of "clipping": - total voting power is guarded to not exceed MaxTotalVotingPower -> panic if this invariant is violated * fix failing test