diff --git a/triedb/pathdb/database.go b/triedb/pathdb/database.go index bc821a460b..e52949c93e 100644 --- a/triedb/pathdb/database.go +++ b/triedb/pathdb/database.go @@ -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 { diff --git a/triedb/pathdb/database_test.go b/triedb/pathdb/database_test.go index 89ab58e1d9..41212dc9d0 100644 --- a/triedb/pathdb/database_test.go +++ b/triedb/pathdb/database_test.go @@ -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") }