From bca9c5d3de8cbaa23989c06d1540a66d8fe03353 Mon Sep 17 00:00:00 2001 From: Chris Li <271678682li@gmail.com> Date: Tue, 19 Nov 2024 11:09:15 +0800 Subject: [PATCH] fix: force keep 9W blocks --- core/rawdb/chain_freezer.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/rawdb/chain_freezer.go b/core/rawdb/chain_freezer.go index 4953c81237..fd52437027 100644 --- a/core/rawdb/chain_freezer.go +++ b/core/rawdb/chain_freezer.go @@ -71,10 +71,12 @@ func newChainFreezer(datadir string, namespace string, readonly bool, offset uin return nil, err } cf := chainFreezer{ - Freezer: freezer, - quit: make(chan struct{}), - trigger: make(chan chan struct{}), - multiDatabase: multiDatabase, + Freezer: freezer, + quit: make(chan struct{}), + trigger: make(chan chan struct{}), + // After enabling pruneAncient, the ancient data is not retained. In some specific scenarios where it is + // necessary to roll back to blocks prior to the finalized block, it is mandatory to keep the most recent 90,000 blocks in the database to ensure proper functionality and rollback capability. + multiDatabase: false, } cf.threshold.Store(params.FullImmutabilityThreshold) return &cf, nil