Skip to content

Commit

Permalink
Change witness to be ConwayEraOnwards
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed May 3, 2024
1 parent 2def194 commit b7b3548
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions cardano-testnet/src/Testnet/Components/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@ getCurrentEpochNo epochStateView = withFrozenCallStack $ do
pure $ newEpochState ^. L.nesELL

waitAndCheckNewEpochState :: forall m era value. (MonadAssertion m, MonadTest m, MonadIO m, Eq value)
=> EpochStateView -> FilePath -> FilePath -> ShelleyBasedEra era -> Word64 -> Maybe value -> Word64
=> EpochStateView -> FilePath -> FilePath -> ConwayEraOnwards era -> Word64 -> Maybe value -> Word64
-> Lens' (L.NewEpochState (ShelleyLedgerEra era)) value -> m ()
waitAndCheckNewEpochState epochStateView configurationFile socketPath sbe minWait mExpected maxWait lens = do
waitAndCheckNewEpochState epochStateView configurationFile socketPath ceo minWait mExpected maxWait lens = do
let sbe = conwayEraOnwardsToShelleyBasedEra ceo
(EpochNo curEpoch) <- getCurrentEpochNo epochStateView
eProposalResult
<- H.evalIO . runExceptT $ foldEpochState
Expand All @@ -355,11 +356,11 @@ waitAndCheckNewEpochState epochStateView configurationFile socketPath sbe minWai
FullValidation
(EpochNo (curEpoch + maxWait))
()
(\epochState _ _ -> filterEpochState (isSuccess curEpoch) epochState)
(\epochState _ _ -> filterEpochState (isSuccess curEpoch) epochState sbe)
void $ H.evalEither eProposalResult
where
filterEpochState :: (EpochNo -> value -> Bool) -> AnyNewEpochState -> StateT () IO LedgerStateCondition
filterEpochState f (AnyNewEpochState actualEra newEpochState) =
filterEpochState :: (EpochNo -> value -> Bool) -> AnyNewEpochState -> ShelleyBasedEra era -> StateT () IO LedgerStateCondition
filterEpochState f (AnyNewEpochState actualEra newEpochState) sbe =
caseShelleyToBabbageOrConwayEraOnwards
(const $ error "waitAndCheck: Only conway era onwards supported")
(const $ do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ activityChangeProposalTest execConfig epochStateView configurationFile socketPat
(EpochNo epochAfterProp) <- getCurrentEpochNo epochStateView
H.note_ $ "Epoch after \"" <> prefix <> "\" prop: " <> show epochAfterProp

waitAndCheckNewEpochState epochStateView configurationFile socketPath sbe minWait (EpochInterval <$> mExpected) maxWait
waitAndCheckNewEpochState epochStateView configurationFile socketPath ceo minWait (EpochInterval <$> mExpected) maxWait
(nesEpochStateL . epochStateGovStateL . curPParamsGovStateL . ppDRepActivityL)

return thisProposal
Expand Down

0 comments on commit b7b3548

Please sign in to comment.