mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
updated CONSOLECMD.GO
This commit is contained in:
parent
19c8fa1aad
commit
bd58746a7e
1 changed files with 5 additions and 5 deletions
|
|
@ -128,11 +128,11 @@ func remoteConsole(ctx *cli.Context) error {
|
||||||
path = filepath.Join(path, "rinkeby")
|
path = filepath.Join(path, "rinkeby")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endpoint = fmt.Sprintf("%s/geth.ipc", path)
|
endpoint = fmt.Sprintf("%s/XDC.ipc", path)
|
||||||
}
|
}
|
||||||
client, err := dialRPC(endpoint)
|
client, err := dialRPC(endpoint)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Fatalf("Unable to attach to remote geth: %v", err)
|
utils.Fatalf("Unable to attach to remote XDC: %v", err)
|
||||||
}
|
}
|
||||||
config := console.Config{
|
config := console.Config{
|
||||||
DataDir: utils.MakeDataDir(ctx),
|
DataDir: utils.MakeDataDir(ctx),
|
||||||
|
|
@ -161,7 +161,7 @@ func remoteConsole(ctx *cli.Context) error {
|
||||||
|
|
||||||
// dialRPC returns a RPC client which connects to the given endpoint.
|
// dialRPC returns a RPC client which connects to the given endpoint.
|
||||||
// The check for empty endpoint implements the defaulting logic
|
// The check for empty endpoint implements the defaulting logic
|
||||||
// for "geth attach" and "geth monitor" with no argument.
|
// for "XDC attach" and "XDC monitor" with no argument.
|
||||||
func dialRPC(endpoint string) (*rpc.Client, error) {
|
func dialRPC(endpoint string) (*rpc.Client, error) {
|
||||||
if endpoint == "" {
|
if endpoint == "" {
|
||||||
endpoint = node.DefaultIPCEndpoint(clientIdentifier)
|
endpoint = node.DefaultIPCEndpoint(clientIdentifier)
|
||||||
|
|
@ -173,7 +173,7 @@ func dialRPC(endpoint string) (*rpc.Client, error) {
|
||||||
return rpc.Dial(endpoint)
|
return rpc.Dial(endpoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ephemeralConsole starts a new geth node, attaches an ephemeral JavaScript
|
// ephemeralConsole starts a new XDC node, attaches an ephemeral JavaScript
|
||||||
// console to it, executes each of the files specified as arguments and tears
|
// console to it, executes each of the files specified as arguments and tears
|
||||||
// everything down.
|
// everything down.
|
||||||
func ephemeralConsole(ctx *cli.Context) error {
|
func ephemeralConsole(ctx *cli.Context) error {
|
||||||
|
|
@ -185,7 +185,7 @@ func ephemeralConsole(ctx *cli.Context) error {
|
||||||
// Attach to the newly started node and start the JavaScript console
|
// Attach to the newly started node and start the JavaScript console
|
||||||
client, err := node.Attach()
|
client, err := node.Attach()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Fatalf("Failed to attach to the inproc geth: %v", err)
|
utils.Fatalf("Failed to attach to the inproc XDC: %v", err)
|
||||||
}
|
}
|
||||||
config := console.Config{
|
config := console.Config{
|
||||||
DataDir: utils.MakeDataDir(ctx),
|
DataDir: utils.MakeDataDir(ctx),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue