aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/admin.go5
-rw-r--r--cmd/geth/main.go2
2 files changed, 3 insertions, 4 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go
index 2b9956638..17d711297 100644
--- a/cmd/geth/admin.go
+++ b/cmd/geth/admin.go
@@ -275,14 +275,13 @@ func (js *jsre) verbosity(call otto.FunctionCall) otto.Value {
}
func (js *jsre) startMining(call otto.FunctionCall) otto.Value {
- _, err := call.Argument(0).ToInteger()
+ threads, err := call.Argument(0).ToInteger()
if err != nil {
fmt.Println(err)
return otto.FalseValue()
}
- // threads now ignored
- err = js.ethereum.StartMining()
+ err = js.ethereum.StartMining(int(threads))
if err != nil {
fmt.Println(err)
return otto.FalseValue()
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index fd7aae4c2..5da59ff3b 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -401,7 +401,7 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) {
}
}
if ctx.GlobalBool(utils.MiningEnabledFlag.Name) {
- if err := eth.StartMining(); err != nil {
+ if err := eth.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name)); err != nil {
utils.Fatalf("%v", err)
}
}