Skip to content

Commit

Permalink
create-testnet-data: avoid infinite loop when no stake delegators are…
Browse files Browse the repository at this point in the history
… specified
  • Loading branch information
smelc committed Jan 25, 2024
1 parent f531f8d commit e8fe394
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/CreateTestnetData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ runGenesisCreateTestNetDataCmd Cmd.GenesisCreateTestNetDataCmdArgs
-- Distribute M delegates across N pools:
delegations <-
case stakeDelegators of
OnDisk 0 ->
-- Required because the most general case below loops in this case
-- (try @zipWith _ (concat $ repeat []) _@ in a REPL)
pure []
OnDisk _ -> do
let delegates = concat $ repeat stakeDelegatorsDirs
-- We don't need to be attentive to laziness here, because anyway this
Expand Down

0 comments on commit e8fe394

Please sign in to comment.