Commit cf842b3f authored by Felix Lange's avatar Felix Lange

cmd/geth, eth: move --genesis deprecation warning to cmd/geth

This prevents display of the warning for --dev and --olympic.
parent 78b70d79
......@@ -359,6 +359,12 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
go metrics.CollectProcessMetrics(3 * time.Second)
utils.SetupNetwork(ctx)
// Deprecation warning.
if ctx.GlobalIsSet(utils.GenesisFileFlag.Name) {
common.PrintDepricationWarning("--genesis is deprecated. Switch to use 'geth init /path/to/file'")
}
return nil
}
......
......@@ -169,10 +169,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
// Load up any custom genesis block if requested
if len(config.Genesis) > 0 {
// Using println instead of glog to make sure it **always** displays regardless of
// verbosity settings.
common.PrintDepricationWarning("--genesis is deprecated. Switch to use 'geth init /path/to/file'")
block, err := core.WriteGenesisBlock(chainDb, strings.NewReader(config.Genesis))
if err != nil {
return nil, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment