Browse Source

cmd/geth: add support for geth --rinkeby attach

Sorin Neacsu 8 năm trước cách đây
mục cha
commit
1d7d7f57d0
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      cmd/geth/consolecmd.go

+ 6 - 2
cmd/geth/consolecmd.go

@@ -120,8 +120,12 @@ func remoteConsole(ctx *cli.Context) error {
 		if ctx.GlobalIsSet(utils.DataDirFlag.Name) {
 			path = ctx.GlobalString(utils.DataDirFlag.Name)
 		}
-		if path != "" && ctx.GlobalBool(utils.TestnetFlag.Name) {
-			path = filepath.Join(path, "testnet")
+		if path != "" {
+			if ctx.GlobalBool(utils.TestnetFlag.Name) {
+				path = filepath.Join(path, "testnet")
+			} else if ctx.GlobalBool(utils.RinkebyFlag.Name) {
+				path = filepath.Join(path, "rinkeby")
+			}
 		}
 		endpoint = fmt.Sprintf("%s/geth.ipc", path)
 	}