Skip to content

Commit

Permalink
cmd/geth: fix init genesis for dev (ethereum#24693)
Browse files Browse the repository at this point in the history
* cmd/geth: fix init genesis for dev

* use ancient flag for init genesis cmd
  • Loading branch information
s1na authored and cp-wjhan committed Nov 30, 2022
1 parent c1cde5b commit 29241a3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,8 @@ func initGenesis(ctx *cli.Context) error {
// Open and initialise both full and light databases
stack, _ := makeConfigNode(ctx)
defer stack.Close()

for _, name := range []string{"chaindata", "lightchaindata"} {
chaindb, err := stack.OpenDatabase(name, 0, 0, "", false)
chaindb, err := stack.OpenDatabaseWithFreezer(name, 0, 0, ctx.GlobalString(utils.AncientFlag.Name), "", false)
if err != nil {
utils.Fatalf("Failed to open database: %v", err)
}
Expand Down

0 comments on commit 29241a3

Please sign in to comment.