diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-02-20 05:37:13 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-02-20 05:37:13 +0800 |
commit | 765740b829072f9a1bbeff356377a91defd9fdd8 (patch) | |
tree | 825825563579746c5dc5d2f9d2f6d3da3fc96e78 /miner | |
parent | 07c34751da96e3daa023b028494ef1c86cf6d1fc (diff) | |
parent | 5aff8bfb5918e53ba2590b25e6c17e1875870f6a (diff) | |
download | go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.tar go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.tar.gz go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.tar.bz2 go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.tar.lz go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.tar.xz go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.tar.zst go-tangerine-765740b829072f9a1bbeff356377a91defd9fdd8.zip |
Merge pull request #345 from maran/feature/minerthreads
Implement command line argument to set the amount miner threads
Diffstat (limited to 'miner')
-rw-r--r-- | miner/miner.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miner/miner.go b/miner/miner.go index 27afcf684..0cc2361c8 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -20,13 +20,13 @@ type Miner struct { mining bool } -func New(coinbase []byte, eth core.Backend) *Miner { +func New(coinbase []byte, eth core.Backend, minerThreads int) *Miner { miner := &Miner{ Coinbase: coinbase, worker: newWorker(coinbase, eth), } - for i := 0; i < 4; i++ { + for i := 0; i < minerThreads; i++ { miner.worker.register(NewCpuMiner(i, ezp.New())) } |