diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-12 03:11:27 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-12 03:11:27 +0800 |
commit | 0bedf1c3760a1042171fdfde0f119acb683c43ec (patch) | |
tree | 2251978416ad615ee8ca5e465a5bf9ed5b74efed /cmd/geth | |
parent | 59bc5412327469fd13534ee22eaeda91d79286f4 (diff) | |
parent | 48bd48876c02d1a08690b9604df09ef4bcf77838 (diff) | |
download | dexon-0bedf1c3760a1042171fdfde0f119acb683c43ec.tar dexon-0bedf1c3760a1042171fdfde0f119acb683c43ec.tar.gz dexon-0bedf1c3760a1042171fdfde0f119acb683c43ec.tar.bz2 dexon-0bedf1c3760a1042171fdfde0f119acb683c43ec.tar.lz dexon-0bedf1c3760a1042171fdfde0f119acb683c43ec.tar.xz dexon-0bedf1c3760a1042171fdfde0f119acb683c43ec.tar.zst dexon-0bedf1c3760a1042171fdfde0f119acb683c43ec.zip |
Merge pull request #918 from obscuren/cpu_miner_fixes
cmd/geth, miner, backend, xeth: Fixed miner threads to be settable
Diffstat (limited to 'cmd/geth')
-rw-r--r-- | cmd/geth/admin.go | 5 | ||||
-rw-r--r-- | cmd/geth/main.go | 2 |
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) } } |