From c2cc1983160ea0920fcd422a94455f26c027fdcd Mon Sep 17 00:00:00 2001 From: vyzo Date: Tue, 24 Nov 2020 23:32:43 +0200 Subject: [PATCH] fix off by 1 in marking --- chain/store/splitstore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/store/splitstore.go b/chain/store/splitstore.go index 0c6196ff7..a069b28fd 100644 --- a/chain/store/splitstore.go +++ b/chain/store/splitstore.go @@ -222,7 +222,7 @@ func (s *SplitStore) compact() { // Phase 1: mark all reachable CIDs with the current epoch curTs := s.curTs 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 { return s.sweep.Put(cid, epoch) })