aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-04-21 01:34:50 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-04-21 01:34:50 +0800
commit99e825ad96e7b3f655f170a52ad6e408b6feb311 (patch)
tree06f41da20ebc0b759f839c396e5bc1ad79cc3055 /cmd
parent3d7c1b8194e509f61fb64a129242b3170ecffd08 (diff)
parent61885aa965282d5879b9c4fbb740e96e9b680558 (diff)
downloaddexon-99e825ad96e7b3f655f170a52ad6e408b6feb311.tar
dexon-99e825ad96e7b3f655f170a52ad6e408b6feb311.tar.gz
dexon-99e825ad96e7b3f655f170a52ad6e408b6feb311.tar.bz2
dexon-99e825ad96e7b3f655f170a52ad6e408b6feb311.tar.lz
dexon-99e825ad96e7b3f655f170a52ad6e408b6feb311.tar.xz
dexon-99e825ad96e7b3f655f170a52ad6e408b6feb311.tar.zst
dexon-99e825ad96e7b3f655f170a52ad6e408b6feb311.zip
Merge pull request #734 from bas-vk/issue-729
admin.StopRPC added to console
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/admin.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go
index defbb43ec..bd09291bf 100644
--- a/cmd/geth/admin.go
+++ b/cmd/geth/admin.go
@@ -28,6 +28,7 @@ func (js *jsre) adminBindings() {
admin := t.Object()
admin.Set("suggestPeer", js.suggestPeer)
admin.Set("startRPC", js.startRPC)
+ admin.Set("stopRPC", js.stopRPC)
admin.Set("nodeInfo", js.nodeInfo)
admin.Set("peers", js.peers)
admin.Set("newAccount", js.newAccount)
@@ -226,6 +227,13 @@ func (js *jsre) startRPC(call otto.FunctionCall) otto.Value {
return otto.TrueValue()
}
+func (js *jsre) stopRPC(call otto.FunctionCall) otto.Value {
+ if rpc.Stop() == nil {
+ return otto.TrueValue()
+ }
+ return otto.FalseValue()
+}
+
func (js *jsre) suggestPeer(call otto.FunctionCall) otto.Value {
nodeURL, err := call.Argument(0).ToString()
if err != nil {