Skip to content

Commit

Permalink
Merge pull request #24281 from karalabe/dev-read-write
Browse files Browse the repository at this point in the history
cmd/utils: fix regression placing dev mode datadir readonly
  • Loading branch information
karalabe committed Jan 24, 2022
2 parents 78636ee + 4230f5f commit f9ce40b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f9ce40b

Please sign in to comment.