cmd, dashboard, log: log collection and exploration (#17097)
* cmd, dashboard, internal, log, node: logging feature * cmd, dashboard, internal, log: requested changes * dashboard, vendor: gofmt, govendor, use vendored file watcher * dashboard, log: gofmt -s -w, goimports * dashboard, log: gosimple
This commit is contained in:
committed by
Péter Szilágyi
parent
2eedbe799f
commit
a9835c1816
@ -179,7 +179,7 @@ func (c *Config) NodeDB() string {
|
||||
if c.DataDir == "" {
|
||||
return "" // ephemeral
|
||||
}
|
||||
return c.resolvePath(datadirNodeDatabase)
|
||||
return c.ResolvePath(datadirNodeDatabase)
|
||||
}
|
||||
|
||||
// DefaultIPCEndpoint returns the IPC path used by default.
|
||||
@ -262,8 +262,8 @@ var isOldGethResource = map[string]bool{
|
||||
"trusted-nodes.json": true,
|
||||
}
|
||||
|
||||
// resolvePath resolves path in the instance directory.
|
||||
func (c *Config) resolvePath(path string) string {
|
||||
// ResolvePath resolves path in the instance directory.
|
||||
func (c *Config) ResolvePath(path string) string {
|
||||
if filepath.IsAbs(path) {
|
||||
return path
|
||||
}
|
||||
@ -309,7 +309,7 @@ func (c *Config) NodeKey() *ecdsa.PrivateKey {
|
||||
return key
|
||||
}
|
||||
|
||||
keyfile := c.resolvePath(datadirPrivateKey)
|
||||
keyfile := c.ResolvePath(datadirPrivateKey)
|
||||
if key, err := crypto.LoadECDSA(keyfile); err == nil {
|
||||
return key
|
||||
}
|
||||
@ -332,12 +332,12 @@ func (c *Config) NodeKey() *ecdsa.PrivateKey {
|
||||
|
||||
// StaticNodes returns a list of node enode URLs configured as static nodes.
|
||||
func (c *Config) StaticNodes() []*discover.Node {
|
||||
return c.parsePersistentNodes(c.resolvePath(datadirStaticNodes))
|
||||
return c.parsePersistentNodes(c.ResolvePath(datadirStaticNodes))
|
||||
}
|
||||
|
||||
// TrustedNodes returns a list of node enode URLs configured as trusted nodes.
|
||||
func (c *Config) TrustedNodes() []*discover.Node {
|
||||
return c.parsePersistentNodes(c.resolvePath(datadirTrustedNodes))
|
||||
return c.parsePersistentNodes(c.ResolvePath(datadirTrustedNodes))
|
||||
}
|
||||
|
||||
// parsePersistentNodes parses a list of discovery node URLs loaded from a .json
|
||||
|
Reference in New Issue
Block a user