diff --git a/node/config.go b/node/config.go index abbe64f43cc122003bd09b50ed9d995f77eab5ec..e9693277ad3b6215a23ba02facebf46f63c0a468 100644 --- a/node/config.go +++ b/node/config.go @@ -35,7 +35,7 @@ import ( "github.com/ethereum/go-ethereum/p2p/discover" ) -var ( +const ( datadirPrivateKey = "nodekey" // Path within the datadir to the node's private key datadirDefaultKeyStore = "keystore" // Path within the datadir to the keystore datadirStaticNodes = "static-nodes.json" // Path within the datadir to the static node list @@ -160,7 +160,7 @@ func (c *Config) NodeDB() string { if c.DataDir == "" { return "" // ephemeral } - return c.resolvePath("nodes") + return c.resolvePath(datadirNodeDatabase) } // DefaultIPCEndpoint returns the IPC path used by default. diff --git a/node/utils_test.go b/node/utils_test.go index 7cdfc2b3aa3bf89d1e3e3cce03d7d0427cf327d4..8eddce3ed7a4443a5d43371790863255d12ac6c6 100644 --- a/node/utils_test.go +++ b/node/utils_test.go @@ -41,12 +41,10 @@ func NewNoopService(*ServiceContext) (Service, error) { return new(NoopService), type NoopServiceA struct{ NoopService } type NoopServiceB struct{ NoopService } type NoopServiceC struct{ NoopService } -type NoopServiceD struct{ NoopService } func NewNoopServiceA(*ServiceContext) (Service, error) { return new(NoopServiceA), nil } func NewNoopServiceB(*ServiceContext) (Service, error) { return new(NoopServiceB), nil } func NewNoopServiceC(*ServiceContext) (Service, error) { return new(NoopServiceC), nil } -func NewNoopServiceD(*ServiceContext) (Service, error) { return new(NoopServiceD), nil } // InstrumentedService is an implementation of Service for which all interface // methods can be instrumented both return value as well as event hook wise.