diff --git a/cardano-cli/src/Cardano/CLI/Parsers.hs b/cardano-cli/src/Cardano/CLI/Parsers.hs index 7a8d909448a..f8d3c13f331 100644 --- a/cardano-cli/src/Cardano/CLI/Parsers.hs +++ b/cardano-cli/src/Cardano/CLI/Parsers.hs @@ -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 ] diff --git a/cardano-node-chairman/src/Testnet/Byron.hs b/cardano-node-chairman/src/Testnet/Byron.hs index eca0e5c58e8..8e81cb949c1 100644 --- a/cardano-node-chairman/src/Testnet/Byron.hs +++ b/cardano-node-chairman/src/Testnet/Byron.hs @@ -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" diff --git a/cardano-node-chairman/src/Testnet/ByronShelley.hs b/cardano-node-chairman/src/Testnet/ByronShelley.hs index 096e266e586..9ed56e6faa3 100644 --- a/cardano-node-chairman/src/Testnet/ByronShelley.hs +++ b/cardano-node-chairman/src/Testnet/ByronShelley.hs @@ -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