cmd/geth: fix init genesis for dev (#24693)

* cmd/geth: fix init genesis for dev

* use ancient flag for init genesis cmd
This commit is contained in:
Sina Mahmoodi 2022-05-04 16:14:14 +02:00 committed by GitHub
parent d6b77f661c
commit b3af0a5538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}