Fix Flags in Create Subcommand (#5928)

* fix flag parsing
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into fixCreateconfig
* Merge refs/heads/master into fixCreateconfig
This commit is contained in:
Nishant Das 2020-05-21 02:19:30 +08:00 committed by GitHub
parent 49edcb099b
commit e3d07489dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,6 +59,7 @@ var appFlags = []cli.Flag{
flags.KeyManager,
flags.KeyManagerOpts,
flags.DisableAccountMetricsFlag,
flags.MonitoringPortFlag,
flags.SlasherRPCProviderFlag,
flags.SlasherCertFlag,
cmd.VerbosityFlag,
@ -69,18 +70,17 @@ var appFlags = []cli.Flag{
cmd.TracingProcessNameFlag,
cmd.TracingEndpointFlag,
cmd.TraceSampleFractionFlag,
flags.MonitoringPortFlag,
cmd.LogFormat,
cmd.LogFileName,
cmd.ConfigFileFlag,
cmd.ChainConfigFileFlag,
cmd.GrpcMaxCallRecvMsgSizeFlag,
debug.PProfFlag,
debug.PProfAddrFlag,
debug.PProfPortFlag,
debug.MemProfileRateFlag,
debug.CPUProfileFlag,
debug.TraceFlag,
cmd.LogFileName,
cmd.ConfigFileFlag,
cmd.ChainConfigFileFlag,
cmd.GrpcMaxCallRecvMsgSizeFlag,
}
func init() {
@ -105,16 +105,18 @@ func main() {
Description: `creates a new validator account keystore containing private keys for Ethereum 2.0 -
this command outputs a deposit data string which can be used to deposit Ether into the ETH1.0 deposit
contract in order to activate the validator client`,
Flags: []cli.Flag{
flags.KeystorePathFlag,
flags.PasswordFlag,
},
Flags: append(featureconfig.ActiveFlags(featureconfig.ValidatorFlags),
[]cli.Flag{
flags.KeystorePathFlag,
flags.PasswordFlag,
cmd.ChainConfigFileFlag,
}...),
Action: func(cliCtx *cli.Context) error {
featureconfig.ConfigureValidator(cliCtx)
if featureconfig.Get().MinimalConfig {
log.Warn("Using Minimal Config")
params.UseMinimalConfig()
if cliCtx.IsSet(cmd.ChainConfigFileFlag.Name) {
chainConfigFileName := cliCtx.String(cmd.ChainConfigFileFlag.Name)
params.LoadChainConfigFile(chainConfigFileName)
}
featureconfig.ConfigureValidator(cliCtx)
keystorePath, passphrase, err := accounts.HandleEmptyKeystoreFlags(cliCtx, true /*confirmPassword*/)
if err != nil {