Skip to content

Commit 91327bf

Browse files
committed
Fixes required by rebasing
1 parent 884800e commit 91327bf

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed

cardano-testnet/src/Testnet/EpochStateProcessing.hs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ module Testnet.EpochStateProcessing
55
, findCondition
66
) where
77

8-
import Cardano.Api (AnyNewEpochState (..), ConwayEra, EpochNo, File (File),
9-
FoldBlocksError, LedgerStateCondition (..), MonadIO, ShelleyBasedEra,
10-
ValidationMode (FullValidation), foldEpochState, runExceptT,
11-
shelleyBasedEraConstraints)
8+
import Cardano.Api (AnyNewEpochState (..), ConwayEra, ConwayEraOnwards, EpochNo,
9+
File (File), FoldBlocksError, LedgerStateCondition (..), MonadIO,
10+
ValidationMode (FullValidation), conwayEraOnwardsToShelleyBasedEra,
11+
foldEpochState, runExceptT, shelleyBasedEraConstraints)
1212
import qualified Cardano.Api as Api
1313
import Cardano.Api.Ledger (GovActionId (..))
1414
import qualified Cardano.Api.Ledger as L
@@ -58,11 +58,13 @@ findCondition epochStateFoldFunc configurationFile socketPath maxEpochNo = withF
5858
Just x -> put (Just x) >> pure ConditionMet
5959
Nothing -> pure ConditionNotMet
6060

61-
maybeExtractGovernanceActionIndex :: ShelleyBasedEra ConwayEra -- ^ The era in which the test runs
61+
maybeExtractGovernanceActionIndex :: ()
62+
=> ConwayEraOnwards ConwayEra -- ^ The era in which the test runs
6263
-> Api.TxId
6364
-> AnyNewEpochState
6465
-> Maybe Word32
65-
maybeExtractGovernanceActionIndex sbe txid (AnyNewEpochState actualEra newEpochState) =
66+
maybeExtractGovernanceActionIndex ceo txid (AnyNewEpochState actualEra newEpochState) =
67+
let sbe = conwayEraOnwardsToShelleyBasedEra ceo in
6668
case testEquality sbe actualEra of
6769
Just Refl -> do
6870
let proposals = shelleyBasedEraConstraints sbe newEpochState

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ makeActivityChangeProposal execConfig epochStateView configurationFile socketPat
307307

308308
governanceActionTxId <- retrieveTransactionId execConfig signedProposalTx
309309

310-
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex sbe (fromString governanceActionTxId))
310+
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex ceo (fromString governanceActionTxId))
311311
(unFile configurationFile)
312312
(unFile socketPath)
313313
(EpochNo timeout)

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ hprop_ledger_events_info_action = H.integrationRetryWorkspace 0 "info-hash" $ \t
5555

5656
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"
5757

58-
let sbe = ShelleyBasedEraConway
58+
let ceo = ConwayEraOnwardsConway
59+
sbe = conwayEraOnwardsToShelleyBasedEra ceo
5960
era = toCardanoEra sbe
6061
fastTestnetOptions = cardanoDefaultTestnetOptions
6162
{ cardanoEpochLength = 100
@@ -149,7 +150,7 @@ hprop_ledger_events_info_action = H.integrationRetryWorkspace 0 "info-hash" $ \t
149150
, "--tx-file", txbodySignedFp
150151
]
151152

152-
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex sbe (fromString txidString))
153+
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex ceo (fromString txidString))
153154
configurationFile
154155
socketPath
155156
(EpochNo 10)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import Prelude
2727

2828
import Control.Monad (void)
2929
import Control.Monad.Catch (MonadCatch)
30+
import Data.Data (Typeable)
3031
import Data.String (fromString)
3132
import qualified Data.Text as Text
3233
import Data.Word (Word32)
@@ -312,7 +313,7 @@ makeDesiredPoolNumberChangeProposal execConfig epochStateView configurationFile
312313

313314
governanceActionTxId <- retrieveTransactionId execConfig signedProposalTx
314315

315-
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex sbe (fromString governanceActionTxId))
316+
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex ceo (fromString governanceActionTxId))
316317
(unFile configurationFile)
317318
(unFile socketPath)
318319
(EpochNo 30)
@@ -338,11 +339,10 @@ type DefaultSPOVote = (String, Int)
338339
-- | Create and issue votes for (or against) a government proposal with default
339340
-- Delegate Representative (DReps created by 'cardanoTestnetDefault') and
340341
-- default Stake Pool Operatorsusing using @cardano-cli@.
341-
voteChangeProposal :: (MonadTest m, MonadIO m, MonadCatch m, H.MonadAssertion m)
342+
voteChangeProposal :: (Typeable era, MonadTest m, MonadIO m, MonadCatch m, H.MonadAssertion m)
342343
=> H.ExecConfig -- ^ Specifies the CLI execution configuration.
343344
-> EpochStateView -- ^ Current epoch state view for transaction building. It can be obtained
344-
-- using the 'getEpochStateView' function.
345-
-> ConwayEraOnwards ConwayEra -- ^ The @ConwayEraOnwards@ witness for the Conway era.
345+
-> ConwayEraOnwards era -- ^ The @ConwayEraOnwards@ witness for the current era.
346346
-> FilePath -- ^ Base directory path where the subdirectory with the intermediate files will be created.
347347
-> String -- ^ Name for the subdirectory that will be created for storing the intermediate files.
348348
-> String -- ^ Transaction id of the governance action to vote.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ makeUpdateConstitutionalCommitteeProposal execConfig epochStateView configuratio
302302

303303
governanceActionTxId <- retrieveTransactionId execConfig signedProposalTx
304304

305-
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex sbe (fromString governanceActionTxId))
305+
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex ceo (fromString governanceActionTxId))
306306
(unFile configurationFile)
307307
(unFile socketPath)
308308
(EpochNo 10)
@@ -441,7 +441,7 @@ makeNoConfidenceProposal execConfig epochStateView configurationFile socketPath
441441

442442
governanceActionTxId <- retrieveTransactionId execConfig signedProposalTx
443443

444-
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex sbe (fromString governanceActionTxId))
444+
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex ceo (fromString governanceActionTxId))
445445
(unFile configurationFile)
446446
(unFile socketPath)
447447
(EpochNo 30)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n
172172

173173
governanceActionTxId <- retrieveTransactionId execConfig signedProposalTx
174174

175-
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex sbe (fromString governanceActionTxId))
175+
!propSubmittedResult <- findCondition (maybeExtractGovernanceActionIndex ceo (fromString governanceActionTxId))
176176
configurationFile
177177
socketPath
178178
(EpochNo 10)
@@ -205,7 +205,7 @@ hprop_ledger_events_propose_new_constitution = H.integrationWorkspace "propose-n
205205
(File configurationFile)
206206
(File socketPath)
207207
FullValidation
208-
(EpochNo 10)
208+
(EpochNo 30)
209209
()
210210
(\epochState _ _ -> foldBlocksCheckConstitutionWasRatified constitutionHash constitutionScriptHash epochState)
211211

0 commit comments

Comments
 (0)