diff --git a/core/blockchain.go b/core/blockchain.go index 2f2164e3c4..1e6186ed91 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -884,7 +884,7 @@ func (bc *BlockChain) Stop() { if !bc.cacheConfig.TrieDirtyDisabled { triedb := bc.stateCache.TrieDB() - for _, offset := range []uint64{0, 1, math.MaxUint64} { + for _, offset := range []uint64{0, 1, bc.cacheConfig.TriesInMemory - 1, math.MaxUint64} { if number := bc.CurrentBlock().NumberU64(); number > offset { var recent *types.Block if offset == math.MaxUint {