aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/js.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-08-07 15:56:49 +0800
committerBas van Kervel <bas@ethdev.com>2015-08-12 18:22:16 +0800
commitf9cbd16f27e393d4937354ee31435e0a2f689484 (patch)
tree0b9668443084923b2b264cd0fb1b1b8c604cf1d6 /cmd/geth/js.go
parent2fcf7f1241648dc2c0ed90a122c5945f25b3ce1a (diff)
downloaddexon-f9cbd16f27e393d4937354ee31435e0a2f689484.tar.gz
dexon-f9cbd16f27e393d4937354ee31435e0a2f689484.tar.zst
dexon-f9cbd16f27e393d4937354ee31435e0a2f689484.zip
support for user agents
Diffstat (limited to 'cmd/geth/js.go')
-rw-r--r--cmd/geth/js.go10
1 files changed, 3 insertions, 7 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()