Skip to content

Commit 8cf34ed

Browse files
committed
Review fixes
1 parent 8ad1337 commit 8cf34ed

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

cardano-testnet/src/Testnet/Components/Configuration.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ createSPOGenesisAndFiles
165165
(TmpAbsolutePath tempAbsPath) = do
166166
AnyShelleyBasedEra sbe <- pure cardanoNodeEra
167167

168-
let genesisShelleyDirAbs = takeDirectory inputGenesisShelleyFp
168+
169+
let genesisShelleyDir = takeDirectory inputGenesisShelleyFp
170+
171+
liftIOAnnotated $ System.createDirectoryIfMissing True genesisShelleyDir
169172

170-
genesisShelleyDir <- liftIOAnnotated $ System.createDirectoryIfMissing True genesisShelleyDirAbs >> pure genesisShelleyDirAbs
171173
let -- At least there should be a delegator per DRep
172174
-- otherwise some won't be representing anybody
173175
numStakeDelegators = max 3 (fromIntegral cardanoNumDReps) :: Int

cardano-testnet/src/Testnet/Process/RunIO.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ execFlexAny'
139139
-> m (ExitCode, String, String) -- ^ exit code, stdout, stderr
140140
execFlexAny' execConfig pkgBin envBin arguments = GHC.withFrozenCallStack $ do
141141
cp <- procFlex' execConfig pkgBin envBin arguments
142-
--H.annotate . ("━━━━ command ━━━━\n" <>) $ case IO.cmdspec cp of
143-
-- IO.ShellCommand cmd -> cmd
144-
-- IO.RawCommand cmd args -> cmd <> " " <> L.unwords (argQuote <$> args)
145142
liftIOAnnotated $ IO.readCreateProcessWithExitCode cp ""
146143

147144

cardano-testnet/src/Testnet/Property/Assert.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ assertExpectedSposInLedgerState output (NumPools numExpectedPools) execConfig =
100100
let numPoolsInLedgerState = Set.size poolSet
101101
unless (numPoolsInLedgerState == numExpectedPools) $
102102
throwString $ unlines
103-
[ "Expected number of stake pooFvls not found in ledger state"
103+
[ "Expected number of stake pools not found in ledger state"
104104
, "Expected: ", show numExpectedPools
105105
, "Actual: ", show numPoolsInLedgerState
106106
]

cardano-testnet/src/Testnet/Runtime.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,11 @@ startNode tp node ipv4 port _testnetMagic nodeCmd = GHC.withFrozenCallStack $ do
153153

154154
-- The port number if it is obtained using 'H.randomPort', it is firstly bound to and then closed. The closing
155155
-- and release in the operating system is done asynchronously and can be slow. Here we wait until the port
156-
157-
isClosed <- liftIOAnnotated $ Ping.waitForPortClosed 45 0.1 port
156+
157+
let portWaitTimeout = 45
158+
isClosed <- liftIOAnnotated $ Ping.waitForPortClosed portWaitTimeout 0.1 port
158159
unless isClosed $
159-
throwString $ "Port is still in use after 30 seconds before starting node: " <> show port
160+
throwString $ "Port is still in use after " ++ show portWaitTimeout ++ " seconds before starting node: " <> show port
160161

161162
(Just stdIn, _, _, hProcess, _)
162163
<- firstExceptT ProcessRelatedFailure $ initiateProcess

cardano-testnet/src/Testnet/Start/Cardano.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ createTestnetEnv
142142

143143
let producers = NodeId <$> filter (/= i) nodeIds
144144
topology = Defaults.defaultP2PTopology producers
145-
liftIOAnnotated . LBS.writeFile (nodeDataDir </> "topology.json") $ A.encodePretty topology
145+
liftIOAnnotated . LBS.writeFile (nodeDataDir </> "topology.json") $ A.encodePretty topology
146146

147147
-- | Starts a number of nodes, as configured by the value of the 'cardanoNodes'
148148
-- field in the 'CardanoTestnetOptions' argument. Regarding this field, you can either:

0 commit comments

Comments
 (0)