Implement command line argument to set the amount of agents created by the miner

Defaults to the amount of cores available on the CPU
This commit is contained in:
Maran
2015-02-19 10:38:36 +01:00
parent ee9df32dba
commit 5aff8bfb59
5 changed files with 23 additions and 17 deletions

View File

@ -225,7 +225,7 @@ func StartMining(ethereum *eth.Ethereum) bool {
go func() {
clilogger.Infoln("Start mining")
if gminer == nil {
gminer = miner.New(addr, ethereum)
gminer = miner.New(addr, ethereum, 4)
}
gminer.Start()
}()