Skip to content

Commit

Permalink
Add a test case for many cold keys mapping to one hot key
Browse files Browse the repository at this point in the history
  • Loading branch information
lehins committed Jun 28, 2024
1 parent 60cf261 commit 4510227
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,22 @@ votingSpec =
passNEpochs 2
-- The same vote should now successfully ratify the proposal
getLastEnactedCommittee `shouldReturn` SJust (GovPurposeId addCCGaid)
it "Many CC Cold Credentials map to the same Hot Credential act as many votes" $ do
hotCred NE.:| _ <- registerInitialCommittee
(dRep, _, _) <- setupSingleDRep . getPositive =<< arbitrary
Positive deposit <- arbitrary
gaId <- submitParameterChange SNothing $ def & ppuDRepDepositL .~ SJust (Coin deposit)
submitYesVote_ (CommitteeVoter hotCred) gaId
whenPostBootstrap $ submitYesVote_ (DRepVoter dRep) gaId
passNEpochs 2
getLastEnactedParameterChange `shouldReturn` SNothing
-- Make sure all committee members authorize the same hot credential that just voted:
committeeMembers' <- Set.toList <$> getCommitteeMembers
case committeeMembers' of
x : xs -> void $ registerCommitteeHotKeys (pure hotCred) $ x NE.:| xs
_ -> error "Expected an initial committee"
passNEpochs 2
getLastEnactedParameterChange `shouldReturn` SJust (GovPurposeId gaId)

delayingActionsSpec ::
forall era.
Expand Down

0 comments on commit 4510227

Please sign in to comment.