Skip to content

Commit

Permalink
Fix voting power change behaviour around 0
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Oct 11, 2023
1 parent 852dac4 commit 8aee401
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/difference/core/quint_model/ccv.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ module ccv {
// the power of a validator on the provider chain is changed to the given amount. We do not care how this happens,
// e.g. via undelegations, or delegations, ...
pure def votingPowerChange(currentState: ProtocolState, validator: Node, amount: int): Result = {
if (amount <= 0) {
Err("Voting power changes must be positive")
if (amount < 0) {
Err("Voting power changes must be nonnegative")
} else {
pure val currentValidatorSet = currentState.providerState.chainState.currentValidatorSet
pure val newValidatorSet = getUpdatedValidatorSet(currentValidatorSet, validator, amount)
Expand Down

0 comments on commit 8aee401

Please sign in to comment.