From b3af0a55385bac913c500c052aabc0316191a3ec Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> Date: Wed, 4 May 2022 16:14:14 +0200 Subject: [PATCH] cmd/geth: fix init genesis for dev (#24693) * cmd/geth: fix init genesis for dev * use ancient flag for init genesis cmd --- cmd/geth/chaincmd.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index a0f9e5773f..6e19edeb46 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -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) }