check the amount of cosigners while cosigning

This commit is contained in:
Hongrui Fang 2022-07-13 17:58:18 +08:00
parent 44d6267004
commit f9ddda4cc0
3 changed files with 47 additions and 44 deletions

View file

@ -14,7 +14,7 @@ import Agora.Proposal (
PProposalDatum (PProposalDatum),
PProposalRedeemer (..),
PProposalVotes (PProposalVotes),
Proposal (governorSTAssetClass, stakeSTAssetClass),
Proposal (..),
ProposalStatus (..),
pretractVotes,
pwinner',
@ -429,6 +429,9 @@ proposalValidator proposal =
# newSigs
# proposalF.cosigners
pguardC "Less cosigners than maximum limit" $
plength # updatedSigs #< pconstant proposal.maximumCosigners
pguardC "Cosigners are unique" $
pisUniq' # updatedSigs