aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-01-21 05:17:46 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-01-21 05:17:46 +0800
commit7b11e9444195cc728437d568bb61e1e86034ba39 (patch)
tree05df00d45c9066c1eb29e3c8f55ddb8b5048376a /cmd
parente7f6798b591d08e1a3b6d23eda46519e2564f6e6 (diff)
parentcdd34fcb166cdb90ee411d029e6851325e80c8d3 (diff)
downloadgo-tangerine-7b11e9444195cc728437d568bb61e1e86034ba39.tar
go-tangerine-7b11e9444195cc728437d568bb61e1e86034ba39.tar.gz
go-tangerine-7b11e9444195cc728437d568bb61e1e86034ba39.tar.bz2
go-tangerine-7b11e9444195cc728437d568bb61e1e86034ba39.tar.lz
go-tangerine-7b11e9444195cc728437d568bb61e1e86034ba39.tar.xz
go-tangerine-7b11e9444195cc728437d568bb61e1e86034ba39.tar.zst
go-tangerine-7b11e9444195cc728437d568bb61e1e86034ba39.zip
Merge pull request #2132 from bas-vk/console-sleep
console: add admin.sleep and admin.sleepBlocks
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/js.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/geth/js.go b/cmd/geth/js.go
index 9329eaa0e..cdafab7fa 100644
--- a/cmd/geth/js.go
+++ b/cmd/geth/js.go
@@ -348,6 +348,15 @@ func (js *jsre) apiBindings(f xeth.Frontend) error {
persObj.Set("newAccount", jeth.NewAccount)
}
+ // The admin.sleep and admin.sleepBlocks are offered by the console and not by the RPC layer.
+ // Bind these if the admin module is available.
+ if a, err := js.re.Get("admin"); err == nil {
+ if adminObj := a.Object(); adminObj != nil {
+ adminObj.Set("sleepBlocks", jeth.SleepBlocks)
+ adminObj.Set("sleep", jeth.Sleep)
+ }
+ }
+
return nil
}