From eeb322ae649c4a1a32430cdddfffed70f509181e Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 18 Aug 2016 13:28:17 +0200 Subject: 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. --- cmd/geth/consolecmd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/geth/consolecmd.go') 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. -- cgit v1.2.3