From d342e654f3a699db56bc0be43885e0e73881b7a9 Mon Sep 17 00:00:00 2001 From: Anshal Shukla Date: Mon, 14 Aug 2023 14:00:26 +0530 Subject: [PATCH] add db.engine flag --- internal/cli/server/config.go | 4 ++++ internal/cli/server/flags.go | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index dcee1e26f5..fda7146edf 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -67,6 +67,9 @@ type Config struct { // Ancient is the directory to store the state in Ancient string `hcl:"ancient,optional" toml:"ancient,optional"` + // DBEngine is used to select leveldb or pebble as database + DBEngine string `hcl:"dbengine,optional" toml:"dbengine,optional"` + // KeyStoreDir is the directory to store keystores KeyStoreDir string `hcl:"keystore,optional" toml:"keystore,optional"` @@ -1278,6 +1281,7 @@ func (c *Config) buildNode() (*node.Config, error) { cfg := &node.Config{ Name: clientIdentifier, DataDir: c.DataDir, + DBEngine: c.DBEngine, KeyStoreDir: c.KeyStoreDir, UseLightweightKDF: c.Accounts.UseLightweightKDF, InsecureUnlockAllowed: c.Accounts.AllowInsecureUnlock, diff --git a/internal/cli/server/flags.go b/internal/cli/server/flags.go index d0a53aa4b8..d33f96fa39 100644 --- a/internal/cli/server/flags.go +++ b/internal/cli/server/flags.go @@ -53,6 +53,12 @@ func (c *Command) Flags() *flagset.Flagset { Value: &c.cliConfig.Ancient, Default: c.cliConfig.Ancient, }) + f.StringFlag(&flagset.StringFlag{ + Name: "db.engine", + Usage: "Backing database implementation to use ('leveldb' or 'pebble')", + Value: &c.cliConfig.DBEngine, + Default: "leveldb", + }) f.StringFlag(&flagset.StringFlag{ Name: "keystore", Usage: "Path of the directory where keystores are located",