diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Query.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Query.hs index dbde869f4ec..9d2150e9cbe 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Query.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Cli/Query.hs @@ -52,7 +52,7 @@ import System.Directory (makeAbsolute) import System.FilePath (()) import Testnet.Components.Query (checkDRepsNumber, getEpochStateView, - watchEpochStateUpdate, getCurrentEpochNo) + watchEpochStateUpdate) import qualified Testnet.Defaults as Defaults import Testnet.Process.Cli.Transaction (TxOutAddress (ReferenceScriptAddress), retrieveTransactionId, signTx, simpleSpendOutputsOnlyTx, spendOutputsOnlyTx, @@ -299,11 +299,7 @@ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H. do -- wait for the proposal stage to end shelleyGenesisVal <- H.evalEitherM $ readJsonFile shelleyGeneisFile - currentEpoch <- getCurrentEpochNo epochStateView - liftIO $ putStrLn $ "\nCurrent epoch is: " ++ show currentEpoch waitForFuturePParamsToStabilise shelleyGenesisVal - newCurrentEpoch <- getCurrentEpochNo epochStateView - liftIO $ putStrLn $ "New current epoch is: " ++ show newCurrentEpoch -- to stdout output <- execCli' execConfig [ eraName, "query", "gov-state" ] H.diffVsGoldenFile output "test/cardano-testnet-test/files/golden/queries/govStateOut.json" @@ -360,21 +356,8 @@ hprop_cli_queries = integrationWorkspace "cli-queries" $ \tempAbsBasePath' -> H. currentEpochStart = fromNominalDiffTimeMicro slotLength `multNominalDiffTime` (epochLength * unEpochNo currentEpoch) `addUTCTime` systemStart currentEpochStabilisationTime = timeAfterEpochToWaitTo `addUTCTime` currentEpochStart timeToWait = currentEpochStabilisationTime `diffUTCTime` currentTime - liftIO $ putStrLn $ "I get the currentEpoch is: " ++ show currentEpoch - liftIO $ putStrLn $ "I get the currentSlot is: " ++ show currentSlot - liftIO $ putStrLn $ "I get the securityParam is: " ++ show securityParam - liftIO $ putStrLn $ "I get the activeSlotsCoeff is: " ++ show activeSlotsCoeff - liftIO $ putStrLn $ "I get I need to wait till slot: " ++ show (unSlotNo currentSlot `div` epochLength * epochLength + fromIntegral slotsAfterEpochToWaitTo) if timeToWait > 0 - then do threadDelay $ truncate $ timeToWait * 1_000_000 - currentTime' <- liftIO getCurrentTime - let chainRuntime' = currentTime' `diffUTCTime` systemStart - currentSlot' = L.SlotNo $ floor $ nominalDiffTimeToSeconds chainRuntime' / nominalDiffTimeToSeconds (fromNominalDiffTimeMicro slotLength) - currentEpoch' = L.EpochNo $ unSlotNo currentSlot' `div` epochLength - liftIO $ putStrLn $ "Now I get the currentEpoch is: " ++ show currentEpoch' - liftIO $ putStrLn $ "Now I get the currentSlot is: " ++ show currentSlot' - liftIO $ putStrLn $ "Now I get the securityParam is: " ++ show securityParam - liftIO $ putStrLn $ "Now I get the activeSlotsCoeff is: " ++ show activeSlotsCoeff + then threadDelay $ truncate $ timeToWait * 1_000_000 else pure () readVerificationKeyFromFile :: (MonadIO m, MonadCatch m, MonadTest m, HasTextEnvelope (VerificationKey keyrole), SerialiseAsBech32 (VerificationKey keyrole))