diff options
author | Bas van Kervel <basvankervel@ziggo.nl> | 2015-06-08 18:43:58 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@gmail.com> | 2015-06-11 20:01:39 +0800 |
commit | a1a475fb9296e214292840d89811123292c7953c (patch) | |
tree | be92dc0faa0f62276fbb6b1fef529cec8280a12c /cmd/geth | |
parent | 2a0d888326036be9cabe6680617ce2d1a27761d3 (diff) | |
download | go-tangerine-a1a475fb9296e214292840d89811123292c7953c.tar go-tangerine-a1a475fb9296e214292840d89811123292c7953c.tar.gz go-tangerine-a1a475fb9296e214292840d89811123292c7953c.tar.bz2 go-tangerine-a1a475fb9296e214292840d89811123292c7953c.tar.lz go-tangerine-a1a475fb9296e214292840d89811123292c7953c.tar.xz go-tangerine-a1a475fb9296e214292840d89811123292c7953c.tar.zst go-tangerine-a1a475fb9296e214292840d89811123292c7953c.zip |
added console command
Diffstat (limited to 'cmd/geth')
-rw-r--r-- | cmd/geth/js.go | 10 | ||||
-rw-r--r-- | cmd/geth/main.go | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/cmd/geth/js.go b/cmd/geth/js.go index 706bc6554..d1a6cc29d 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -73,7 +73,7 @@ type jsre struct { prompter } -func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, interactive bool, f xeth.Frontend) *jsre { +func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain, ipcpath string, interactive bool, f xeth.Frontend) *jsre { js := &jsre{ethereum: ethereum, ps1: "> "} // set default cors domain used by startRpc from CLI flag js.corsDomain = corsDomain @@ -84,7 +84,7 @@ func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, interactive boo js.wait = js.xeth.UpdateState() // update state in separare forever blocks js.re = re.New(libPath) - js.apiBindings(f) + js.apiBindings(ipcpath, f) js.adminBindings() if !liner.TerminalSupported() || !interactive { @@ -103,10 +103,10 @@ func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, interactive boo return js } -func (js *jsre) apiBindings(f xeth.Frontend) { +func (js *jsre) apiBindings(ipcpath string, f xeth.Frontend) { xe := xeth.New(js.ethereum, f) ethApi := rpc.NewEthereumApi(xe) - jeth := rpc.NewJeth(ethApi, js.re) + jeth := rpc.NewJeth(ethApi, js.re, ipcpath) js.re.Set("jeth", struct{}{}) t, _ := js.re.Get("jeth") @@ -119,7 +119,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) { utils.Fatalf("Error loading bignumber.js: %v", err) } - err = js.re.Compile("ethereum.js", re.Ethereum_JS) + err = js.re.Compile("ethereum.js", re.Web3_JS) if err != nil { utils.Fatalf("Error loading ethereum.js: %v", err) } diff --git a/cmd/geth/main.go b/cmd/geth/main.go index d180c269f..5d7e102c4 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -307,6 +307,7 @@ func console(ctx *cli.Context) { repl := newJSRE( ethereum, ctx.String(utils.JSpathFlag.Name), + ctx.GlobalString(utils.IPCPathFlag.Name), ctx.GlobalString(utils.RPCCORSDomainFlag.Name), true, nil, @@ -328,6 +329,7 @@ func execJSFiles(ctx *cli.Context) { repl := newJSRE( ethereum, ctx.String(utils.JSpathFlag.Name), + ctx.GlobalString(utils.IPCPathFlag.Name), ctx.GlobalString(utils.RPCCORSDomainFlag.Name), false, nil, |