Skip to content

Commit

Permalink
commit both oldest and tries-in-memory on shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee committed Aug 30, 2022
1 parent 494b0a5 commit 7503143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7503143

Please sign in to comment.