Update storage/wdpost_run.go

Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
This commit is contained in:
Leo Cheung 2020-07-06 06:20:41 -05:00 committed by GitHub
parent ddba20ccdf
commit 874cb46cb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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{