diff options
author | Felix Lange <fjl@twurst.com> | 2016-08-18 19:28:17 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-09-16 21:24:31 +0800 |
commit | eeb322ae649c4a1a32430cdddfffed70f509181e (patch) | |
tree | 35622201208afb98665743d9bcf88883058e772a /cmd/geth/consolecmd.go | |
parent | 52ede09b172094f8fd85f8b10e7d0578059353fb (diff) | |
download | go-tangerine-eeb322ae649c4a1a32430cdddfffed70f509181e.tar go-tangerine-eeb322ae649c4a1a32430cdddfffed70f509181e.tar.gz go-tangerine-eeb322ae649c4a1a32430cdddfffed70f509181e.tar.bz2 go-tangerine-eeb322ae649c4a1a32430cdddfffed70f509181e.tar.lz go-tangerine-eeb322ae649c4a1a32430cdddfffed70f509181e.tar.xz go-tangerine-eeb322ae649c4a1a32430cdddfffed70f509181e.tar.zst go-tangerine-eeb322ae649c4a1a32430cdddfffed70f509181e.zip |
node: ensure datadir can be co-inhabited by different instances
This change ensures that nodes started with different Name but same
DataDir values don't use the same nodekey and IPC socket.
Diffstat (limited to 'cmd/geth/consolecmd.go')
-rw-r--r-- | cmd/geth/consolecmd.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go index 92d6f7f86..066247303 100644 --- a/cmd/geth/consolecmd.go +++ b/cmd/geth/consolecmd.go @@ -107,7 +107,7 @@ func remoteConsole(ctx *cli.Context) error { utils.Fatalf("Unable to attach to remote geth: %v", err) } config := console.Config{ - DataDir: utils.MustMakeDataDir(ctx), + DataDir: utils.MakeDataDir(ctx), DocRoot: ctx.GlobalString(utils.JSpathFlag.Name), Client: client, Preload: utils.MakeConsolePreloads(ctx), @@ -135,7 +135,7 @@ func remoteConsole(ctx *cli.Context) error { // for "geth attach" and "geth monitor" with no argument. func dialRPC(endpoint string) (*rpc.Client, error) { if endpoint == "" { - endpoint = node.DefaultIPCEndpoint() + endpoint = node.DefaultIPCEndpoint(clientIdentifier) } else if strings.HasPrefix(endpoint, "rpc:") || strings.HasPrefix(endpoint, "ipc:") { // Backwards compatibility with geth < 1.5 which required // these prefixes. |