Skip to content

Commit

Permalink
Add comment for where opt farser for NetworkId is gotten from
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeinsky committed Sep 30, 2022
1 parent 242a80d commit 83a3cb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion marconi-mamba/app/Main.hs
Expand Up @@ -18,6 +18,9 @@ args = Args
<*> Opt.strOption (Opt.long "db" <> Opt.metavar "FILE" <> Opt.help "Path to the utxo database.")
<*> pNetworkId
where
-- TODO: `pNetworkId` and `pTestnetMagic` are copied from
-- https://github.com/input-output-hk/cardano-node/blob/988c93085022ed3e2aea5d70132b778cd3e622b9/cardano-cli/src/Cardano/CLI/Shelley/Parsers.hs#L2009-L2027
-- Use them from there whenever they are exported.
pNetworkId :: Opt.Parser C.NetworkId
pNetworkId =
pMainnet Opt.<|> fmap C.Testnet pTestnetMagic
Expand All @@ -28,7 +31,6 @@ args = Args
( Opt.long "mainnet"
<> Opt.help "Use the mainnet magic id."
)

pTestnetMagic :: Opt.Parser C.NetworkMagic
pTestnetMagic =
C.NetworkMagic <$>
Expand Down

0 comments on commit 83a3cb6

Please sign in to comment.