fix off by 1 in marking

This commit is contained in:
vyzo 2020-11-24 23:32:43 +02:00
parent fd08786048
commit c2cc198316

View File

@ -222,7 +222,7 @@ func (s *SplitStore) compact() {
// Phase 1: mark all reachable CIDs with the current epoch // Phase 1: mark all reachable CIDs with the current epoch
curTs := s.curTs curTs := s.curTs
epoch := curTs.Height() epoch := curTs.Height()
err := s.cs.WalkSnapshot(context.Background(), curTs, epoch-s.baseEpoch, false, false, err := s.cs.WalkSnapshot(context.Background(), curTs, epoch-s.baseEpoch+1, false, false,
func(cid cid.Cid) error { func(cid cid.Cid) error {
return s.sweep.Put(cid, epoch) return s.sweep.Put(cid, epoch)
}) })