diff options
author | Bas van Kervel <bas@ethdev.com> | 2016-01-19 16:26:17 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2016-01-19 19:30:33 +0800 |
commit | cdd34fcb166cdb90ee411d029e6851325e80c8d3 (patch) | |
tree | 53f5405ffae92580446e8a6790b1c39b5084b9e0 /cmd | |
parent | 5945a33350ea6e8bfc6308826efe16aab0e2e93d (diff) | |
download | go-tangerine-cdd34fcb166cdb90ee411d029e6851325e80c8d3.tar go-tangerine-cdd34fcb166cdb90ee411d029e6851325e80c8d3.tar.gz go-tangerine-cdd34fcb166cdb90ee411d029e6851325e80c8d3.tar.bz2 go-tangerine-cdd34fcb166cdb90ee411d029e6851325e80c8d3.tar.lz go-tangerine-cdd34fcb166cdb90ee411d029e6851325e80c8d3.tar.xz go-tangerine-cdd34fcb166cdb90ee411d029e6851325e80c8d3.tar.zst go-tangerine-cdd34fcb166cdb90ee411d029e6851325e80c8d3.zip |
console: add admin.sleep and admin.sleepBlocks
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/geth/js.go | 9 |
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 } |