miner: fix data race in tests (#20310)

* miner: fix data race in tests

miner: fix linter

* miner: address comment
This commit is contained in:
gary rong
2019-11-20 18:36:41 +08:00
committed by Péter Szilágyi
parent f71e85b8e2
commit 9b59c75405
3 changed files with 28 additions and 104 deletions

View File

@ -72,7 +72,7 @@ func New(eth Backend, config *Config, chainConfig *params.ChainConfig, mux *even
mux: mux,
engine: engine,
exitCh: make(chan struct{}),
worker: newWorker(config, chainConfig, engine, eth, mux, isLocalBlock),
worker: newWorker(config, chainConfig, engine, eth, mux, isLocalBlock, true),
canStart: 1,
}
go miner.update()