diff --git a/storage/wdpost_run.go b/storage/wdpost_run.go index fcace70dd..f0d18d7f4 100644 --- a/storage/wdpost_run.go +++ b/storage/wdpost_run.go @@ -150,6 +150,15 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, deadline if err != nil { return xerrors.Errorf("checking unrecovered sectors: %w", err) } + + // check some unrecovered sectors can not recovered (such as cache file is missing) + 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 + } params := &miner.DeclareFaultsRecoveredParams{ Recoveries: []miner.RecoveryDeclaration{{Deadline: deadline, Sectors: sbf}},