Skip to content

Commit

Permalink
Apply review comments (2/n) (will ultimately be squashed)
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Dec 12, 2023
1 parent f576658 commit a5d8ae8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cardano-cli/src/Cardano/CLI/EraBased/Run/CreateTestnetData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import qualified Cardano.Ledger.Shelley.API as Ledger
import Ouroboros.Consensus.Shelley.Node (ShelleyGenesisStaking (..))

import Control.DeepSeq (NFData, force)
import Control.Monad (forM, forM_, unless, void)
import Control.Monad (forM, forM_, unless, void, zipWithM)
import Control.Monad.Except (MonadError (..), runExceptT)
import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
Expand Down Expand Up @@ -258,11 +258,10 @@ runGenesisCreateTestNetDataCmd Cmd.GenesisCreateTestNetDataCmdArgs
case stakeDelegators of
OnDisk _ -> do
let delegates = concat $ repeat stakeDelegatorsDirs
delegatesAndPools = zip delegates distribution
-- We don't need to be attentive to laziness here, because anyway this
-- doesn't scale really well (because we're generating legit credentials,
-- as opposed to the Transient case).
forM delegatesAndPools (uncurry $ computeDelegation networkId)
zipWithM (computeDelegation networkId) delegates distribution
Transient _ ->
liftIO $ Lazy.forStateM g distribution $ flip computeInsecureDelegation networkId

Expand Down

0 comments on commit a5d8ae8

Please sign in to comment.