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)
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user