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:
@ -425,10 +425,10 @@ func (self *XEth) ClientVersion() string {
|
||||
return self.backend.ClientVersion()
|
||||
}
|
||||
|
||||
func (self *XEth) SetMining(shouldmine bool) bool {
|
||||
func (self *XEth) SetMining(shouldmine bool, threads int) bool {
|
||||
ismining := self.backend.IsMining()
|
||||
if shouldmine && !ismining {
|
||||
err := self.backend.StartMining()
|
||||
err := self.backend.StartMining(threads)
|
||||
return err == nil
|
||||
}
|
||||
if ismining && !shouldmine {
|
||||
|
Reference in New Issue
Block a user