From 874cb46cb3fa6174bc72b431aba378e79449e10f Mon Sep 17 00:00:00 2001 From: Leo Cheung Date: Mon, 6 Jul 2020 06:20:41 -0500 Subject: [PATCH] Update storage/wdpost_run.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Magiera --- storage/wdpost_run.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/storage/wdpost_run.go b/storage/wdpost_run.go index 59b477388..0034e4b5e 100644 --- a/storage/wdpost_run.go +++ b/storage/wdpost_run.go @@ -154,10 +154,12 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, deadline // if all sectors failed to recover, don't declare recoveries sbfCount, err := sbf.Count() if err != nil { - log.Errorf(" sbf.Count() | %v", err) - } else if sbfCount == 0 { - log.Warnf("unrecovered exists sbf.Count() sectors can not recovery, exit this function.", err) - return nil + return xerrors.Errorf("counting recovered sectors: %w", err) + } + + if sbfCount == 0 { + log.Warnw("No recoveries to declare", "deadline", deadline, "faulty", uc) + return nil } params := &miner.DeclareFaultsRecoveredParams{