fix: delete unexpected block (#2562)

This commit is contained in:
Chris Li 2024-07-08 19:21:56 +08:00 committed by GitHub
parent a5810fefc9
commit bc970e5893
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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 {