From bc970e58931fdba7ae167dfa665d484505e0cd46 Mon Sep 17 00:00:00 2001 From: Chris Li Date: Mon, 8 Jul 2024 19:21:56 +0800 Subject: [PATCH] fix: delete unexpected block (#2562) --- core/rawdb/prunedfreezer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/rawdb/prunedfreezer.go b/core/rawdb/prunedfreezer.go index 51c772975..212d51735 100644 --- a/core/rawdb/prunedfreezer.go +++ b/core/rawdb/prunedfreezer.go @@ -299,9 +299,8 @@ func (f *prunedfreezer) freeze() { log.Error("Append ancient err", "number", f.frozen, "hash", hash, "err", err) break } - if hash != (common.Hash{}) { - ancients = append(ancients, hash) - } + // may include common.Hash{}, will be delete in gcKvStore + ancients = append(ancients, hash) } // Batch of blocks have been frozen, flush them before wiping from leveldb if err := f.Sync(); err != nil {