Skip to content

Commit

Permalink
Simplify note comment on macos sytem assertion
Browse files Browse the repository at this point in the history
Also make use of when instead.

Co-authored-by: Sebastian Nagel <[email protected]>
  • Loading branch information
ffakenz and ch1bo authored Jan 3, 2024
1 parent b2e7d76 commit 6bf74da
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hydra-cluster/src/HydraNode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,9 @@ withHydraNode' ::
(Handle -> Maybe Handle -> ProcessHandle -> IO a) ->
IO a
withHydraNode' chainConfig workDir hydraNodeId hydraSKey hydraVKeys allNodeIds pparams mGivenStdOut action = do
case os of
-- XXX: this is to not bind to port 5000 on darwin systems,
-- as it might already be in use on recent macOS devices.
"darwin" -> hydraNodeId `shouldNotBe` 0
_ -> pure ()
-- NOTE: AirPlay on MacOS uses 5000 and we must avoid it.
when (os == "darwin") $
port `shouldNotBe` 5000
withSystemTempDirectory "hydra-node" $ \dir -> do
let cardanoLedgerProtocolParametersFile = dir </> "pparams.json"
writeFileBS cardanoLedgerProtocolParametersFile (writeZeroedPParams pparams)
Expand Down

0 comments on commit 6bf74da

Please sign in to comment.