aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-08-14 07:25:33 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-08-14 07:25:33 +0800
commit28b14d3e6d43cb27019e21d0a93a80e7bee1de8c (patch)
tree9995026e87221a80cb5171364ffa734459c16b16 /cmd/geth
parent73c4e6005c3e47342a4631955ca6fd2782925886 (diff)
parentf9cbd16f27e393d4937354ee31435e0a2f689484 (diff)
downloadgo-tangerine-28b14d3e6d43cb27019e21d0a93a80e7bee1de8c.tar
go-tangerine-28b14d3e6d43cb27019e21d0a93a80e7bee1de8c.tar.gz
go-tangerine-28b14d3e6d43cb27019e21d0a93a80e7bee1de8c.tar.bz2
go-tangerine-28b14d3e6d43cb27019e21d0a93a80e7bee1de8c.tar.lz
go-tangerine-28b14d3e6d43cb27019e21d0a93a80e7bee1de8c.tar.xz
go-tangerine-28b14d3e6d43cb27019e21d0a93a80e7bee1de8c.tar.zst
go-tangerine-28b14d3e6d43cb27019e21d0a93a80e7bee1de8c.zip
Merge pull request #1635 from bas-vk/useragent
support for user agents
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/js.go10
-rw-r--r--cmd/geth/main.go2
2 files changed, 4 insertions, 8 deletions
diff --git a/cmd/geth/js.go b/cmd/geth/js.go
index bf56423ec..ff319ab6b 100644
--- a/cmd/geth/js.go
+++ b/cmd/geth/js.go
@@ -145,19 +145,15 @@ func apiWordCompleter(line string, pos int) (head string, completions []string,
return begin, completionWords, end
}
-func newLightweightJSRE(libPath string, client comms.EthereumClient, interactive bool, f xeth.Frontend) *jsre {
+func newLightweightJSRE(libPath string, client comms.EthereumClient, interactive bool) *jsre {
js := &jsre{ps1: "> "}
js.wait = make(chan *big.Int)
js.client = client
js.ds = docserver.New("/")
- if f == nil {
- f = js
- }
-
// update state in separare forever blocks
js.re = re.New(libPath)
- if err := js.apiBindings(f); err != nil {
+ if err := js.apiBindings(js); err != nil {
utils.Fatalf("Unable to initialize console - %v", err)
}
@@ -291,7 +287,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) error {
utils.Fatalf("Unable to determine supported api's: %v", err)
}
- jeth := rpc.NewJeth(api.Merge(apiImpl...), js.re, js.client)
+ jeth := rpc.NewJeth(api.Merge(apiImpl...), js.re, js.client, f)
js.re.Set("jeth", struct{}{})
t, _ := js.re.Get("jeth")
jethObj := t.Object()
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 4905d502a..d5391801d 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -425,7 +425,7 @@ func attach(ctx *cli.Context) {
ctx.GlobalString(utils.JSpathFlag.Name),
client,
true,
- nil)
+ )
if ctx.GlobalString(utils.ExecFlag.Name) != "" {
repl.batch(ctx.GlobalString(utils.ExecFlag.Name))