Skip to content

Commit

Permalink
chore(simapp): Remove rather than deprecate --v
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Jan 22, 2024
1 parent 7c51419 commit 94d765c
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions simapp/simd/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ type startArgs struct {

func addTestnetFlagsToCmd(cmd *cobra.Command) {
cmd.Flags().IntP(flagNumValidators, "n", 4, "Number of validators to initialize the testnet with")
cmd.Flags().Int("v", 4, fmt.Sprintf("Alias for --%s", flagNumValidators))
if vFlag := cmd.Flags().Lookup("v"); vFlag != nil {
vFlag.Deprecated = fmt.Sprintf("use --%s", flagNumValidators)
}
cmd.Flags().StringP(flagOutputDir, "o", "./.testnets", "Directory to store initialization data for the testnet")
cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
cmd.Flags().String(server.FlagMinGasPrices, fmt.Sprintf("0.000006%s", sdk.DefaultBondDenom), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photino,0.001stake)")
Expand Down Expand Up @@ -152,13 +148,6 @@ Example:
args.numValidators, _ = cmd.Flags().GetInt(flagNumValidators)
args.algo, _ = cmd.Flags().GetString(flags.FlagKeyType)

if cmd.Flags().Changed("v") {
if cmd.Flags().Changed(flagNumValidators) {
return fmt.Errorf("--%s and --v are mutually exclusive", flagNumValidators)
}
args.numValidators, _ = cmd.Flags().GetInt("v")
}

return initTestnetFiles(clientCtx, cmd, config, mbm, genBalIterator, clientCtx.TxConfig.SigningContext().ValidatorAddressCodec(), args)
},
}
Expand Down Expand Up @@ -198,13 +187,6 @@ Example:
args.grpcAddress, _ = cmd.Flags().GetString(flagGRPCAddress)
args.printMnemonic, _ = cmd.Flags().GetBool(flagPrintMnemonic)

if cmd.Flags().Changed("v") {
if cmd.Flags().Changed(flagNumValidators) {
return fmt.Errorf("--%s and --v are mutually exclusive", flagNumValidators)
}
args.numValidators, _ = cmd.Flags().GetInt("v")
}

return startTestnet(cmd, args)
},
}
Expand Down

0 comments on commit 94d765c

Please sign in to comment.