From cefd5a67bdb51fa54e54b9fd683f67c70f6b70a3 Mon Sep 17 00:00:00 2001 From: Jordan Millar Date: Mon, 20 May 2024 15:01:58 -0400 Subject: [PATCH] WIP improve logging of epoch state --- cardano-testnet/src/Testnet/Runtime.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cardano-testnet/src/Testnet/Runtime.hs b/cardano-testnet/src/Testnet/Runtime.hs index 3a230dc728b..b5937bf7061 100644 --- a/cardano-testnet/src/Testnet/Runtime.hs +++ b/cardano-testnet/src/Testnet/Runtime.hs @@ -56,6 +56,7 @@ import qualified Hedgehog as H import Hedgehog.Extras.Stock.IO.Network.Sprocket (Sprocket (..)) import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as H import qualified Hedgehog.Extras.Test.Base as H +import qualified Data.Type.Bool as blocks data NodeStartFailure = ProcessRelatedFailure ProcessError @@ -252,6 +253,10 @@ startLedgerNewEpochStateLogging testnetRuntime tmpWorkspace = withFrozenCallStac handleException = handle $ \(e :: SomeException) -> do liftIO $ appendFile outputFpHandle $ "Ledger new epoch logging failed - caught exception:\n" <> displayException e <> "\n" + + -- We produce another logging fail that displays the diffs of the epoch state + -- between blocks + logFileContent <- liftIO $ readFile outputFp pure ConditionMet -- TODO: Not sure why this isn't terminating. Read up on resourcet and how it works. -- See concurrency section: https://www.fpcomplete.com/blog/understanding-resourcet/