aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-17 07:42:30 +0800
committerobscuren <geffobscura@gmail.com>2015-05-18 19:59:22 +0800
commitc67424ecc8a75d7c0bc942227a4c4e5c5628d7bc (patch)
treec234714a27c5bab93d56236601524cf7664df5e8 /eth
parent443d0248436f653bc2d56653dd52b8abbe408f60 (diff)
downloadgo-tangerine-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.tar
go-tangerine-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.tar.gz
go-tangerine-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.tar.bz2
go-tangerine-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.tar.lz
go-tangerine-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.tar.xz
go-tangerine-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.tar.zst
go-tangerine-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.zip
core: parallelise nonce checking when processing blocks
ChainManager now uses a parallel approach to block processing where all nonces are checked seperatly from the block processing process. This speeds up the process by about 3 times on my i7
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go
index a7107f8d8..519a4c410 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -266,9 +266,9 @@ func New(config *Config) (*Ethereum, error) {
MinerThreads: config.MinerThreads,
}
- eth.chainManager = core.NewChainManager(blockDb, stateDb, eth.EventMux())
- eth.downloader = downloader.New(eth.EventMux(), eth.chainManager.HasBlock, eth.chainManager.GetBlock)
eth.pow = ethash.New()
+ eth.chainManager = core.NewChainManager(blockDb, stateDb, eth.pow, eth.EventMux())
+ eth.downloader = downloader.New(eth.EventMux(), eth.chainManager.HasBlock, eth.chainManager.GetBlock)
eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State, eth.chainManager.GasLimit)
eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.txPool, eth.chainManager, eth.EventMux())
eth.chainManager.SetProcessor(eth.blockProcessor)