mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
stop state size inside stop without saving
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
e1c599e286
commit
0a14a72eab
1 changed files with 6 additions and 5 deletions
|
|
@ -1259,6 +1259,12 @@ func (bc *BlockChain) stopWithoutSaving() {
|
|||
// Signal shutdown to all goroutines.
|
||||
bc.InterruptInsert(true)
|
||||
|
||||
// Stop state size generator if running
|
||||
if bc.stateSizeGen != nil {
|
||||
bc.stateSizeGen.Stop()
|
||||
log.Info("Stopped state size generator")
|
||||
}
|
||||
|
||||
// Now wait for all chain modifications to end and persistent goroutines to exit.
|
||||
//
|
||||
// Note: Close waits for the mutex to become available, i.e. any running chain
|
||||
|
|
@ -1320,11 +1326,6 @@ func (bc *BlockChain) Stop() {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Stop state size generator if running
|
||||
if bc.stateSizeGen != nil {
|
||||
bc.stateSizeGen.Stop()
|
||||
log.Info("Stopped state size generator")
|
||||
}
|
||||
|
||||
// Allow tracers to clean-up and release resources.
|
||||
if bc.logger != nil && bc.logger.OnClose != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue