Skip to content

Commit 05bcad3

Browse files
committed
Add haddock for parameters of testNoConfidenceProposal and review
1 parent 22df072 commit 05bcad3

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/PredefinedAbstainDRep.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ delegateToAlwaysAbstain execConfig epochStateView configurationFile socketPath s
148148
delegateToAutomaticDRep execConfig epochStateView configurationFile socketPath sbe work prefix
149149
"--always-abstain"
150150

151-
-- | Delegates to a staking key pair with the delegation preference set to automatic.
151+
-- | Delegates a staking key pair to an automatic DRep.
152152
delegateToAutomaticDRep
153153
:: (HasCallStack, MonadTest m, MonadIO m, H.MonadAssertion m, MonadCatch m)
154154
=> H.ExecConfig -- ^ Specifies the CLI execution configuration.
@@ -159,7 +159,7 @@ delegateToAutomaticDRep
159159
-> ShelleyBasedEra ConwayEra -- ^ The Shelley based era witness for ConwayEra
160160
-> FilePath -- ^ Base directory path where generated files will be stored.
161161
-> String -- ^ Name for the subfolder that will be created under 'work' folder.
162-
-> String -- ^ Additional command-line arguments for the delegation.
162+
-> String -- ^ Additional command-line argument for the delegation.
163163
-> PaymentKeyInfo -- ^ Wallet that will pay for the transaction.
164164
-> StakingKeyPair -- ^ Staking key pair used for delegation.
165165
-> m ()

cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/LedgerEvents/Gov/PredefinedNoConfidenceDRep.hs

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ makeUpdateConstitutionalCommitteeProposal execConfig epochStateView configuratio
317317

318318
return (governanceActionTxId, governanceActionIndex)
319319

320-
-- | Delegate to a staking key pair with the delegation preference set to always no confidence.
320+
-- | Delegate a staking key pair to the automated no confidence DRep.
321321
delegateToAlwaysNoConfidence
322322
:: (MonadTest m, MonadIO m, H.MonadAssertion m, MonadCatch m, HasCallStack)
323323
=> H.ExecConfig -- ^ Specifies the CLI execution configuration.
@@ -335,19 +335,24 @@ delegateToAlwaysNoConfidence execConfig epochStateView configurationFile socketP
335335
delegateToAutomaticDRep execConfig epochStateView configurationFile socketPath sbe work prefix
336336
"--always-no-confidence"
337337

338+
-- Run a no confidence motion and check the result. Vote "yes" with 3 SPOs. Check the no
339+
-- confidence motion passes.
338340
testNoConfidenceProposal
339341
:: (MonadTest m, MonadIO m, H.MonadAssertion m, MonadCatch m, Foldable t, HasCallStack)
340-
=> H.ExecConfig
341-
-> EpochStateView
342-
-> FilePath
343-
-> FilePath
344-
-> ConwayEraOnwards ConwayEra
345-
-> FilePath
346-
-> FilePath
347-
-> PaymentKeyInfo
348-
-> (String, Word32)
349-
-> t (Int, String)
350-
-> Integer
342+
=> H.ExecConfig -- ^ Specifies the CLI execution configuration.
343+
-> EpochStateView -- ^ Current epoch state view for transaction building. It can be obtained
344+
-- using the 'getEpochStateView' function.
345+
-> FilePath -- ^ Path to the node configuration file as returned by 'cardanoTestnetDefault'.
346+
-> FilePath -- ^ Path to the cardano-node unix socket file.
347+
-> ConwayEraOnwards ConwayEra -- ^ The Shelley based era witness for ConwayEra onwards.
348+
-> FilePath -- ^ Base directory path where generated files will be stored.
349+
-> String -- ^ Name for the subfolder that will be created under 'work' folder.
350+
-> PaymentKeyInfo -- ^ Wallet that will pay for the transaction.
351+
-> (String, Word32) -- ^ Tuple containing the preivous proposal transaction id and index.
352+
-> t (Int, String) -- ^ Model of DRep votes for proposal, list of pairs with an amount
353+
-- of votes and the and type of vote (i.e: "yes", "no", or "abstain").
354+
-> Integer -- ^ Epoch till which to wait before checking the result of the no
355+
-- confidence proposal passes.
351356
-> m (String, Word32)
352357
testNoConfidenceProposal execConfig epochStateView configurationFile socketPath ceo work prefix
353358
wallet previousProposalInfo votes waitTillEpoch = do

0 commit comments

Comments
 (0)