Skip to content

Commit 31c3a60

Browse files
fix(indexer): fix potential panic in chain reconciliation logic during backfill (#12813)
Co-authored-by: Peter Rabbitson <[email protected]>
1 parent 5e566ba commit 31c3a60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chain/index/reconcile.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ func (si *SqliteIndexer) backfillIndex(ctx context.Context, tx *sql.Tx, head *ty
236236
log.Infof("reached stop height %d; backfilled %d tipsets", stopAfter, totalApplied)
237237
return nil
238238
}
239-
239+
height := currTs.Height()
240240
currTs, err = si.cs.GetTipSetFromKey(ctx, currTs.Parents())
241241
if err != nil {
242-
return xerrors.Errorf("failed to walk chain at height %d: %w", currTs.Height(), err)
242+
return xerrors.Errorf("failed to walk chain beyond height %d: %w", height, err)
243243
}
244244
}
245245

0 commit comments

Comments
 (0)