triedb/pathdb: remove unused database entry

This commit is contained in:
Gary Rong 2026-05-06 12:14:57 +08:00
parent 58256271de
commit 1cc112f121
2 changed files with 1 additions and 11 deletions

View file

@ -439,12 +439,8 @@ func (db *Database) AdoptSyncedState(root common.Hash) error {
}
// Tell the snapshot subsystem the flat state is good by writing the new root
// and a "done" marker (nil journal) so the next boot doesn't try to
// rebuild it. Also clear any leftover recovery or disabled flags from a
// previous run.
// and a "done" marker (nil journal) so the next boot doesn't try to rebuild it.
batch := db.diskdb.NewBatch()
rawdb.DeleteSnapshotRecoveryNumber(batch)
rawdb.DeleteSnapshotDisabled(batch)
rawdb.WriteSnapshotRoot(batch, root)
journalProgress(batch, nil, nil)
if err := batch.Write(); err != nil {

View file

@ -798,12 +798,6 @@ func TestAdoptSyncedState(t *testing.T) {
t.Fatalf("Generator marker should be empty, got %x", entry.Marker)
}
}
if rawdb.ReadSnapshotRecoveryNumber(tester.db.diskdb) != nil {
t.Fatal("Recovery flag should be cleared")
}
if rawdb.ReadSnapshotDisabled(tester.db.diskdb) {
t.Fatal("Disabled flag should be cleared")
}
if rawdb.ReadSnapSyncStatusFlag(tester.db.diskdb) != rawdb.StateSyncFinished {
t.Fatal("Sync-status flag should be StateSyncFinished")
}