Skip to content

Commit

Permalink
Do not throw error on optout if val is not opted in
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Mar 25, 2024
1 parent 57ab8b4 commit 667aafa
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/mbt/model/ccv_pss.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ module ccv_pss {
pure def OptOut(currentState: ProtocolState, consumer: Chain, validator: Node): Result = {
if (currentState.IsTopN(validator, consumer)) {
Err("Cannot opt out a validator that is in the top N")
} else if (not(currentState.IsOptedIn(validator, consumer))) {
Err("Cannot opt out a validator that is not opted in")
} else {
pure val optedInVals = currentState.providerState.optedInVals.get(consumer)
pure val newOptedInVals = optedInVals.exclude(Set(validator))
Expand Down

0 comments on commit 667aafa

Please sign in to comment.