Skip to content

Commit

Permalink
WIP improve logging of epoch state
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed May 28, 2024
1 parent cc79ef6 commit cefd5a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cardano-testnet/src/Testnet/Runtime.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 59 in cardano-testnet/src/Testnet/Runtime.hs

View workflow job for this annotation

GitHub Actions / build

Error: Parse error: on input `blocks' ▫︎ Found: " import qualified Hedgehog.Extras.Stock.IO.Network.Sprocket as H\n import qualified Hedgehog.Extras.Test.Base as H\n> import qualified Data.Type.Bool as blocks\n \n data NodeStartFailure\n"

data NodeStartFailure
= ProcessRelatedFailure ProcessError
Expand Down Expand Up @@ -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/
Expand Down

0 comments on commit cefd5a6

Please sign in to comment.