Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer Shelley CLI commands over Byron ones where they clash #2145

Merged
merged 1 commit into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cardano-cli/src/Cardano/CLI/Parsers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ pref = Opt.prefs showHelpOnEmpty
parseClientCommand :: Parser ClientCommand
parseClientCommand =
asum
[ parseByron <|> backwardsCompatibilityCommands
, parseShelley <|> parseDeprecatedShelleySubcommand
-- There are name clashes between Shelley commands and the Byron backwards
-- compat commands (e.g. "genesis"), and we need to prefer the Shelley ones
-- so we list it first.
[ parseShelley
, parseByron
, parseDeprecatedShelleySubcommand
, backwardsCompatibilityCommands
, parseDisplayVersion
]

Expand Down
4 changes: 3 additions & 1 deletion cardano-node-chairman/src/Testnet/Byron.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ testnet H.Conf {..} = do

-- Generate keys
void $ H.execCli
[ "genesis"
[ "byron"
, "genesis"
, "genesis"
, "--genesis-output-dir", tempAbsPath </> "genesis"
, "--start-time", showUTCTimeSeconds startTime
, "--protocol-parameters-file", tempAbsPath </> "protocol-params.json"
Expand Down
4 changes: 3 additions & 1 deletion cardano-node-chairman/src/Testnet/ByronShelley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ testnet testnetOptions H.Conf {..} = do

-- stuff
void . H.execCli $
[ "genesis"
[ "byron"
, "genesis"
, "genesis"
, "--protocol-magic", show @Int testnetMagic
, "--start-time", showUTCTimeSeconds startTime
, "--k", show @Int securityParam
Expand Down