aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth/admin.go')
-rw-r--r--cmd/geth/admin.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go
index f2887c6db..1515cd6ac 100644
--- a/cmd/geth/admin.go
+++ b/cmd/geth/admin.go
@@ -37,6 +37,11 @@ func (js *jsre) adminBindings() {
admin.Set("dumpBlock", js.dumpBlock)
admin.Set("verbosity", js.verbosity)
admin.Set("backtrace", js.backtrace)
+ admin.Set("hashrate", js.hashrate)
+}
+
+func (js *jsre) hashrate(otto.FunctionCall) otto.Value {
+ return js.re.ToVal(js.ethereum.Miner().HashRate())
}
func (js *jsre) backtrace(call otto.FunctionCall) otto.Value {