add db.engine flag

This commit is contained in:
Anshal Shukla 2023-08-14 14:00:26 +05:30
parent b4cc1f65be
commit d342e654f3
2 changed files with 10 additions and 0 deletions

View file

@ -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,

View file

@ -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",