diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-17 07:42:30 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-18 19:59:22 +0800 |
commit | c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc (patch) | |
tree | c234714a27c5bab93d56236601524cf7664df5e8 /cmd | |
parent | 443d0248436f653bc2d56653dd52b8abbe408f60 (diff) | |
download | dexon-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.tar.gz dexon-c67424ecc8a75d7c0bc942227a4c4e5c5628d7bc.tar.zst dexon-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 'cmd')
-rw-r--r-- | cmd/utils/flags.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 6ec4fdc55..f646e4fcc 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -336,8 +336,8 @@ func GetChain(ctx *cli.Context) (*core.ChainManager, common.Database, common.Dat } eventMux := new(event.TypeMux) - chainManager := core.NewChainManager(blockDb, stateDb, eventMux) pow := ethash.New() + chainManager := core.NewChainManager(blockDb, stateDb, pow, eventMux) txPool := core.NewTxPool(eventMux, chainManager.State, chainManager.GasLimit) blockProcessor := core.NewBlockProcessor(stateDb, extraDb, pow, txPool, chainManager, eventMux) chainManager.SetProcessor(blockProcessor) |