actually use the temp cache for pre-migrations

This commit is contained in:
Steven Allen 2021-01-26 18:44:47 -08:00
parent 32059d0cbf
commit 05026a23b9

View File

@ -292,7 +292,7 @@ func (sm *StateManager) preMigrationWorker(ctx context.Context) {
// migration to use the cache may assume that
// certain blocks exist, even if they don't.
tmpCache := cache.Clone()
err := migrationFunc(preCtx, sm, cache, ts.ParentState(), ts.Height(), ts)
err := migrationFunc(preCtx, sm, tmpCache, ts.ParentState(), ts.Height(), ts)
if err != nil {
log.Errorw("failed to run pre-migration",
"error", err)