diff --git a/store/v2/migration/manager.go b/store/v2/migration/manager.go index e32036aa95dd..db88b195712b 100644 --- a/store/v2/migration/manager.go +++ b/store/v2/migration/manager.go @@ -111,7 +111,7 @@ func (m *Manager) Migrate(height uint64) error { return err } - m.migratedVersion.Add(height) + m.migratedVersion.Store(height) return nil } @@ -198,7 +198,7 @@ func (m *Manager) Sync() error { } } - m.migratedVersion.Add(version) + m.migratedVersion.Store(version) version += 1 } diff --git a/store/v2/migration/manager_test.go b/store/v2/migration/manager_test.go index 1b562a9a2aa5..103b3244b650 100644 --- a/store/v2/migration/manager_test.go +++ b/store/v2/migration/manager_test.go @@ -48,7 +48,6 @@ func setupMigrationManager(t *testing.T) (*Manager, *commitment.CommitStore) { } func TestMigrateState(t *testing.T) { - fmt.Println("start") m, orgCommitStore := setupMigrationManager(t) // apply changeset toVersion := uint64(100)