diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-11 21:43:14 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-11 23:21:22 +0800 |
commit | 21e52efdfed19c4376b830f8ad0e52a9e599f633 (patch) | |
tree | a3d6f2be23c64881461892572adc9d1b55cd4b39 /cmd/geth/admin.go | |
parent | 064cf1609987bb0f6c59c1e790b7811d9a783fef (diff) | |
download | go-tangerine-21e52efdfed19c4376b830f8ad0e52a9e599f633.tar go-tangerine-21e52efdfed19c4376b830f8ad0e52a9e599f633.tar.gz go-tangerine-21e52efdfed19c4376b830f8ad0e52a9e599f633.tar.bz2 go-tangerine-21e52efdfed19c4376b830f8ad0e52a9e599f633.tar.lz go-tangerine-21e52efdfed19c4376b830f8ad0e52a9e599f633.tar.xz go-tangerine-21e52efdfed19c4376b830f8ad0e52a9e599f633.tar.zst go-tangerine-21e52efdfed19c4376b830f8ad0e52a9e599f633.zip |
cmd/geth, miner, backend, xeth: Fixed miner threads to be settable
Miner threads are now settable through the admin interface (closes #897)
and specify 0 CPU worker threads when eth_getWork is called (closes #916)
Diffstat (limited to 'cmd/geth/admin.go')
-rw-r--r-- | cmd/geth/admin.go | 5 |
1 files changed, 2 insertions, 3 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() |