mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
core: warn the user that we're saving state on shutdown
This commit is contained in:
parent
a14bfec36d
commit
a4cff48475
1 changed files with 2 additions and 0 deletions
|
|
@ -661,6 +661,8 @@ func (bc *BlockChain) Stop() {
|
|||
// N blocks.
|
||||
if number := bc.CurrentBlock().NumberU64(); number >= triesInMemory {
|
||||
recent := bc.GetBlockByNumber(bc.CurrentBlock().NumberU64() - triesInMemory + 1)
|
||||
|
||||
log.Info("Writing cached state to disk", "block", recent.Number(), "hash", recent.Hash(), "root", recent.Root())
|
||||
if err := bc.triedb.Commit(recent.Root()); err != nil {
|
||||
log.Error("Failed to commit recent state trie", "err", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue