mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
call logger.OnClose before triedb.Close
This commit is contained in:
parent
1e84d87a45
commit
e881bf730c
1 changed files with 4 additions and 4 deletions
|
|
@ -1153,14 +1153,14 @@ func (bc *BlockChain) Stop() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Close the trie database, release all the held resources as the last step.
|
|
||||||
if err := bc.triedb.Close(); err != nil {
|
|
||||||
log.Error("Failed to close trie database", "err", err)
|
|
||||||
}
|
|
||||||
// Allow tracers to clean-up and release resources.
|
// Allow tracers to clean-up and release resources.
|
||||||
if bc.logger != nil && bc.logger.OnClose != nil {
|
if bc.logger != nil && bc.logger.OnClose != nil {
|
||||||
bc.logger.OnClose()
|
bc.logger.OnClose()
|
||||||
}
|
}
|
||||||
|
// Close the trie database, release all the held resources as the last step.
|
||||||
|
if err := bc.triedb.Close(); err != nil {
|
||||||
|
log.Error("Failed to close trie database", "err", err)
|
||||||
|
}
|
||||||
log.Info("Blockchain stopped")
|
log.Info("Blockchain stopped")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue