aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2015-02-19 17:38:36 +0800
committerMaran <maran.hidskes@gmail.com>2015-02-19 17:38:36 +0800
commit5aff8bfb5918e53ba2590b25e6c17e1875870f6a (patch)
tree3961c734a18e1f517d49c0cebc76bbdcae964605 /eth/backend.go
parentee9df32dba5091069cbdad8d00dc15738d676d5b (diff)
downloaddexon-5aff8bfb5918e53ba2590b25e6c17e1875870f6a.tar
dexon-5aff8bfb5918e53ba2590b25e6c17e1875870f6a.tar.gz
dexon-5aff8bfb5918e53ba2590b25e6c17e1875870f6a.tar.bz2
dexon-5aff8bfb5918e53ba2590b25e6c17e1875870f6a.tar.lz
dexon-5aff8bfb5918e53ba2590b25e6c17e1875870f6a.tar.xz
dexon-5aff8bfb5918e53ba2590b25e6c17e1875870f6a.tar.zst
dexon-5aff8bfb5918e53ba2590b25e6c17e1875870f6a.zip
Implement command line argument to set the amount of agents created by the miner
Defaults to the amount of cores available on the CPU
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/eth/backend.go b/eth/backend.go
index d109ab98e..05d84cae8 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -53,6 +53,8 @@ type Config struct {
Shh bool
Dial bool
+ MinerThreads int
+
KeyManager *crypto.KeyManager
}
@@ -153,7 +155,7 @@ func New(config *Config) (*Ethereum, error) {
eth.blockProcessor = core.NewBlockProcessor(db, eth.txPool, eth.chainManager, eth.EventMux())
eth.chainManager.SetProcessor(eth.blockProcessor)
eth.whisper = whisper.New()
- eth.miner = miner.New(keyManager.Address(), eth)
+ eth.miner = miner.New(keyManager.Address(), eth, config.MinerThreads)
hasBlock := eth.chainManager.HasBlock
insertChain := eth.chainManager.InsertChain