Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ffakenz committed Nov 14, 2024
1 parent 0fe5a1a commit e8b6c39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hydra-cluster/src/HydraNode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,14 @@ withHydraNode' tracer chainConfig workDir hydraNodeId hydraSKey hydraVKeys allNo
}
)
{ std_out = maybe CreatePipe UseHandle mGivenStdOut
, std_err = CreatePipe
, std_err = Inherit
}

traceWith tracer $ HydraNodeCommandSpec $ show $ cmdspec p

withCreateProcess p $ \_stdin mCreatedStdOut mCreatedStdErr processHandle ->
case (mCreatedStdOut <|> mGivenStdOut, mCreatedStdErr) of
(Just out, Just err) -> action out err processHandle
(Just out, Nothing) -> action out stderr processHandle
(Nothing, _) -> error "Should not happen™"
(_, Nothing) -> error "Should not happen™"
where
Expand Down
4 changes: 3 additions & 1 deletion hydra-node/src/Hydra/Node/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ run opts = do
ServerOutputFilter
{ txContainsAddr = \tx address ->
not . null $ flip filter (txOuts' tx) $ \(TxOut addr _ _ _) ->
unwrapAddress addr == address
spy' "unwrapAddress addr" $
unwrapAddress addr
== address
}
-- TODO! move somewhere else
unwrapAddress :: AddressInEra -> Text
Expand Down

0 comments on commit e8b6c39

Please sign in to comment.