File tree Expand file tree Collapse file tree
test/cardano-testnet-golden/files/golden Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ### Added
2+
3+ - Added ` --params-file ` and ` --params-mainnet ` flags to ` cardano-testnet cardano ` subcommand.
4+
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ optsTestnet = CardanoTestnetCliOptions
3333 <*> pGenesisOptions
3434 <*> pNodeEnvironment
3535 <*> pUpdateTimestamps
36+ <*> pOnChainParams
3637
3738optsCreateTestnet :: Parser CardanoTestnetCreateEnvOptions
3839optsCreateTestnet = CardanoTestnetCreateEnvOptions
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ module Parsers.Run
1313import Cardano.CLI.Environment
1414
1515import Control.Monad (void )
16- import Data.Default.Class (def )
1716import Options.Applicative
1817import qualified Options.Applicative as Opt
1918
@@ -75,6 +74,7 @@ runCardanoOptions CardanoTestnetCliOptions
7574 , cliGenesisOptions= genesisOptions
7675 , cliNodeEnvironment= env
7776 , cliUpdateTimestamps= updateTimestamps'
77+ , cliOnChainParams= onChainParams
7878 } = do
7979 case env of
8080 NoUserProvidedEnv -> do
@@ -84,7 +84,7 @@ runCardanoOptions CardanoTestnetCliOptions
8484 conf <- mkConfigAbs " testnet"
8585 runSimpleApp . runResourceT $ do
8686 logInfo $ " Creating environment: " <> display (tempAbsPath conf)
87- createTestnetEnv testnetOptions genesisOptions def conf
87+ createTestnetEnv testnetOptions genesisOptions ( CreateEnvOptions onChainParams) conf
8888 logInfo $ " Starting testnet in environment: " <> display (tempAbsPath conf)
8989 void $ cardanoTestnet testnetOptions conf
9090 logInfo " Testnet started"
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ data CardanoTestnetCliOptions = CardanoTestnetCliOptions
8484 , cliGenesisOptions :: GenesisOptions
8585 , cliNodeEnvironment :: UserProvidedEnv
8686 , cliUpdateTimestamps :: UpdateTimestamps
87+ , cliOnChainParams :: TestnetOnChainParams
8788 } deriving (Eq , Show )
8889
8990instance Default CardanoTestnetCliOptions where
@@ -92,6 +93,7 @@ instance Default CardanoTestnetCliOptions where
9293 , cliGenesisOptions = def
9394 , cliNodeEnvironment = def
9495 , cliUpdateTimestamps = def
96+ , cliOnChainParams = def
9597 }
9698
9799data UserProvidedEnv
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Usage: cardano-testnet cardano [--num-pool-nodes COUNT]
1313 [--active-slots-coeff DOUBLE]
1414 [--node-env FILEPATH]
1515 [--update-time]
16+ [--params-file FILEPATH | --params-mainnet]
1617
1718 Start a testnet and keep it running until stopped
1819
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Usage: cardano-testnet cardano [--num-pool-nodes COUNT]
1111 [--active-slots-coeff DOUBLE]
1212 [--node-env FILEPATH]
1313 [--update-time]
14+ [--params-file FILEPATH | --params-mainnet]
1415
1516 Start a testnet and keep it running until stopped
1617
@@ -50,4 +51,8 @@ Available options:
5051 pass it with this argument.
5152 --update-time Update the time stamps in genesis files to current
5253 date
54+ --params-file FILEPATH File containing custom on-chain parameters in
55+ Blockfrost format:
56+ https://docs.blockfrost.io/#tag/cardano--epochs/GET/epochs/latest/parameters
57+ --params-mainnet Use mainnet on-chain parameters
5358 -h,--help Show this help text
You can’t perform that action at this time.
0 commit comments