diff --git a/internal/cli/server/command_test.go b/internal/cli/server/command_test.go index 9f5468f3d3..de6a2d5efa 100644 --- a/internal/cli/server/command_test.go +++ b/internal/cli/server/command_test.go @@ -41,6 +41,7 @@ func TestFlagsWithoutConfig(t *testing.T) { require.Equal(t, c.config.Identity, "") require.Equal(t, c.config.DataDir, "./data") + require.Equal(t, c.config.KeyStoreDir, "") require.Equal(t, c.config.Verbosity, 3) require.Equal(t, c.config.RPCBatchLimit, uint64(0)) require.Equal(t, c.config.Snapshot, true) @@ -74,6 +75,7 @@ func TestFlagsWithConfig(t *testing.T) { require.Equal(t, c.config.Identity, "") require.Equal(t, c.config.DataDir, "./data") + require.Equal(t, c.config.KeyStoreDir, "./keystore") require.Equal(t, c.config.Verbosity, 3) require.Equal(t, c.config.RPCBatchLimit, uint64(0)) require.Equal(t, c.config.Snapshot, true) @@ -105,6 +107,7 @@ func TestFlagsWithConfigAndFlags(t *testing.T) { "--config", "./testdata/test.toml", "--identity", "Anon", "--datadir", "", + "--keystore", "", "--verbosity", "0", "--rpc.batchlimit", "5", "--snapshot=false", @@ -128,6 +131,7 @@ func TestFlagsWithConfigAndFlags(t *testing.T) { require.Equal(t, c.config.Identity, "Anon") require.Equal(t, c.config.DataDir, "") + require.Equal(t, c.config.KeyStoreDir, "") require.Equal(t, c.config.Verbosity, 0) require.Equal(t, c.config.RPCBatchLimit, uint64(5)) require.Equal(t, c.config.Snapshot, false) diff --git a/internal/cli/server/config.go b/internal/cli/server/config.go index 302d310374..cb682e0c40 100644 --- a/internal/cli/server/config.go +++ b/internal/cli/server/config.go @@ -605,6 +605,7 @@ func DefaultConfig() *Config { DataDir: DefaultDataDir(), Ancient: "", DBEngine: "leveldb", + KeyStoreDir: "", Logging: &LoggingConfig{ Vmodule: "", Json: false, diff --git a/internal/cli/server/testdata/test.toml b/internal/cli/server/testdata/test.toml index 522322b2a3..04b2dbed35 100644 --- a/internal/cli/server/testdata/test.toml +++ b/internal/cli/server/testdata/test.toml @@ -1,5 +1,6 @@ identity = "" datadir = "./data" +keystore = "./keystore" verbosity = 3 "rpc.batchlimit" = 0 snapshot = true