From 8a05fe86d6e6504004aae927f2e27dd02a4c6159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 14 Sep 2020 20:33:54 +0200 Subject: [PATCH] wdpost: Skip sectors correctly --- storage/wdpost_run.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/storage/wdpost_run.go b/storage/wdpost_run.go index 8f15c47965f..08a7437a9bb 100644 --- a/storage/wdpost_run.go +++ b/storage/wdpost_run.go @@ -430,14 +430,14 @@ func (s *WindowPoStScheduler) runPost(ctx context.Context, di dline.Info, ts *ty return nil, xerrors.Errorf("adding recoveries to set of sectors to prove: %w", err) } - toProve, err = bitfield.SubtractBitField(toProve, postSkipped) + good, err := s.checkSectors(ctx, toProve) if err != nil { - return nil, xerrors.Errorf("toProve - postSkipped: %w", err) + return nil, xerrors.Errorf("checking sectors to skip: %w", err) } - good, err := s.checkSectors(ctx, toProve) + good, err = bitfield.SubtractBitField(good, postSkipped) if err != nil { - return nil, xerrors.Errorf("checking sectors to skip: %w", err) + return nil, xerrors.Errorf("toProve - postSkipped: %w", err) } skipped, err := bitfield.SubtractBitField(toProve, good)