Skip to content

Commit 1986607

Browse files
committed
node: fix megacheck warnings
1 parent b159cdd commit 1986607

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

node/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
"github.com/ethereum/go-ethereum/p2p/discover"
3636
)
3737

38-
var (
38+
const (
3939
datadirPrivateKey = "nodekey" // Path within the datadir to the node's private key
4040
datadirDefaultKeyStore = "keystore" // Path within the datadir to the keystore
4141
datadirStaticNodes = "static-nodes.json" // Path within the datadir to the static node list
@@ -160,7 +160,7 @@ func (c *Config) NodeDB() string {
160160
if c.DataDir == "" {
161161
return "" // ephemeral
162162
}
163-
return c.resolvePath("nodes")
163+
return c.resolvePath(datadirNodeDatabase)
164164
}
165165

166166
// DefaultIPCEndpoint returns the IPC path used by default.

node/utils_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@ func NewNoopService(*ServiceContext) (Service, error) { return new(NoopService),
4141
type NoopServiceA struct{ NoopService }
4242
type NoopServiceB struct{ NoopService }
4343
type NoopServiceC struct{ NoopService }
44-
type NoopServiceD struct{ NoopService }
4544

4645
func NewNoopServiceA(*ServiceContext) (Service, error) { return new(NoopServiceA), nil }
4746
func NewNoopServiceB(*ServiceContext) (Service, error) { return new(NoopServiceB), nil }
4847
func NewNoopServiceC(*ServiceContext) (Service, error) { return new(NoopServiceC), nil }
49-
func NewNoopServiceD(*ServiceContext) (Service, error) { return new(NoopServiceD), nil }
5048

5149
// InstrumentedService is an implementation of Service for which all interface
5250
// methods can be instrumented both return value as well as event hook wise.

0 commit comments

Comments
 (0)