aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/admin.go5
-rw-r--r--cmd/geth/main.go2
-rw-r--r--cmd/mist/ui_lib.go2
3 files changed, 4 insertions, 5 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)
}
}
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go
index a604e87ba..4653e0980 100644
--- a/cmd/mist/ui_lib.go
+++ b/cmd/mist/ui_lib.go
@@ -159,7 +159,7 @@ func (self *UiLib) RemoveLocalTransaction(id int) {
func (self *UiLib) ToggleMining() bool {
if !self.eth.IsMining() {
- err := self.eth.StartMining()
+ err := self.eth.StartMining(4)
return err == nil
} else {
self.eth.StopMining()