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

@ -63,6 +63,7 @@ var (
DebugFile string
LogLevel int
VmType int
MinerThreads int
)
// flags specific to gui client
@ -137,6 +138,8 @@ func Init() {
flag.StringVar(&BootNodes, "bootnodes", "", "space-separated node URLs for discovery bootstrap")
flag.IntVar(&MaxPeer, "maxpeer", 30, "maximum desired peers")
flag.IntVar(&MinerThreads, "minerthreads", runtime.NumCPU(), "number of miner threads")
flag.Parse()
var err error