cmd/utils: fix regression placing dev mode datadir readonly

pull/24281/head
Péter Szilágyi 3 years ago
parent 78636ee568
commit 4230f5f08f
No known key found for this signature in database
GPG Key ID: E9AE538CEDF8293D
  1. 2
      cmd/utils/flags.go

@ -1675,7 +1675,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
if ctx.GlobalIsSet(DataDirFlag.Name) {
// Check if we have an already initialized chain and fall back to
// that if so. Otherwise we need to generate a new genesis spec.
chaindb := MakeChainDatabase(ctx, stack, true)
chaindb := MakeChainDatabase(ctx, stack, false)
if rawdb.ReadCanonicalHash(chaindb, 0) != (common.Hash{}) {
cfg.Genesis = nil // fallback to db content
}

Loading…
Cancel
Save