@@ -143,6 +143,43 @@ spoAndCCVotingSpec = do
143143
144144      getLastEnactedParameterChange `shouldReturn`  SNothing 
145145      getsPParams ppMinFeeRefScriptCostPerByteL `shouldReturn`  initialRefScriptBaseFee
146+     it " Constitution cannot be changed if thresholds are at zero" .  whenPostBootstrap $  do 
147+       modifyPParams $  \ pp -> 
148+         pp
149+           &  ppDRepVotingThresholdsL .  dvtUpdateToConstitutionL .~  (0  %!  1 )
150+           &  ppCommitteeMinSizeL .~  2 
151+           &  ppCommitteeMaxTermLengthL .~  EpochInterval  50 
152+       coldCommitteeActive <-  KeyHashObj  <$>  freshKeyHash
153+       coldCommitteeInactive <-  KeyHashObj  <$>  freshKeyHash
154+       startingEpoch <-  getsNES nesELL
155+       maxTermLength <-  getsPParams ppCommitteeMaxTermLengthL
156+       (dRep, _, _) <-  setupSingleDRep 1_000_000_000 
157+       (spo, _, _) <-  setupPoolWithStake $  Coin  1_000_000_000 
158+       let 
159+         committeeMap = 
160+           [ (coldCommitteeActive, addEpochInterval startingEpoch maxTermLength)
161+           , (coldCommitteeInactive, addEpochInterval startingEpoch $  EpochInterval  5 )
162+           ]
163+       initialCommittee <-  getCommitteeMembers
164+       committeeActionId <- 
165+         impAnn " Submit committee update" 
166+           .  submitGovAction
167+           $  UpdateCommittee 
168+             SNothing 
169+             initialCommittee
170+             committeeMap
171+             (0  %!  1 )
172+       submitYesVote_ (DRepVoter  dRep) committeeActionId
173+       submitYesVote_ (StakePoolVoter  spo) committeeActionId
174+       passNEpochs 2 
175+       getCommitteeMembers `shouldReturn`  Map. keysSet committeeMap
176+       passNEpochs 3 
177+       newConstitution <-  arbitrary
178+       constitutionActionId <-  submitGovAction $  NewConstitution  SNothing  newConstitution
179+       logRatificationChecks constitutionActionId
180+       passNEpochs 2 
181+       getConstitution `shouldNotReturn`  newConstitution
182+       True `shouldBe`  False 
146183  describe " When CC threshold is 0" $  do 
147184    --  During the bootstrap phase, proposals that modify the committee are not allowed,
148185    --  hence we need to directly set the threshold for the initial members
0 commit comments