eth: close miner on exit (instead of just stopping) (#21992)

This ensures that all miner goroutines have exited before stopping the blockchain. 

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Martin Holst Swende
2021-10-08 18:36:58 +02:00
committed by GitHub
parent 2fe0c65f4b
commit 28d30b51f8
3 changed files with 16 additions and 2 deletions

View File

@ -554,7 +554,7 @@ func (s *Ethereum) Stop() error {
s.bloomIndexer.Close()
close(s.closeBloomHandler)
s.txPool.Stop()
s.miner.Stop()
s.miner.Close()
s.blockchain.Stop()
s.engine.Close()
rawdb.PopUncleanShutdownMarker(s.chainDb)