check thresholds inclusively
This commit is contained in:
parent
f6fe01910a
commit
3238335cdb
2 changed files with 4 additions and 4 deletions
|
|
@ -891,7 +891,7 @@ pwinner' = phoistAcyclic $
|
|||
|
||||
exceedQuorum =
|
||||
ptraceIfFalse "Highest vote count should exceed the minimum threshold" $
|
||||
quorum #< highestVotes
|
||||
quorum #<= highestVotes
|
||||
|
||||
pure $
|
||||
pif
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ proposalValidator =
|
|||
# proposalInputDatumF.cosigners
|
||||
|
||||
pguardC "Less cosigners than maximum limit" $
|
||||
plength # updatedSigs #< maximumCosigners
|
||||
plength # updatedSigs #<= maximumCosigners
|
||||
|
||||
pguardC "Meet minimum GT requirement" $
|
||||
pfromData thresholdsF.cosign #<= stakeF.stakedAmount
|
||||
|
|
@ -467,7 +467,7 @@ proposalValidator =
|
|||
# sctxF.inputStakes
|
||||
|
||||
pguardC "Exceed minimum amount" $
|
||||
thresholdsF.vote #< totalStakeAmount
|
||||
thresholdsF.vote #<= totalStakeAmount
|
||||
|
||||
pguardC "Input proposal must be in VotingReady state" $
|
||||
currentStatus #== pconstant VotingReady
|
||||
|
|
@ -646,7 +646,7 @@ proposalValidator =
|
|||
pmatchC notTooLate >>= \case
|
||||
PTrue -> do
|
||||
pguardC "More cosigns than minimum amount" $
|
||||
punsafeCoerce (pfromData thresholdsF.toVoting) #< sctxF.totalAmount
|
||||
punsafeCoerce (pfromData thresholdsF.toVoting) #<= sctxF.totalAmount
|
||||
|
||||
pguardC "All new cosigners are witnessed by their Stake datums" $
|
||||
plistEqualsBy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue