diff --git a/core/blockchain.go b/core/blockchain.go index 11f0ea71d4..b45cd92e52 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -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. if bc.logger != nil && bc.logger.OnClose != nil { 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") }