Merge pull request #2277 from Leozhang404/master
if no sectors need to recovery, checkNextRecoveries will return
This commit is contained in:
commit
cf6ac44b6e
@ -150,6 +150,17 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, deadline
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("checking unrecovered sectors: %w", err)
|
return xerrors.Errorf("checking unrecovered sectors: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if all sectors failed to recover, don't declare recoveries
|
||||||
|
sbfCount, err := sbf.Count()
|
||||||
|
if err != 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{
|
params := &miner.DeclareFaultsRecoveredParams{
|
||||||
Recoveries: []miner.RecoveryDeclaration{{Deadline: deadline, Sectors: sbf}},
|
Recoveries: []miner.RecoveryDeclaration{{Deadline: deadline, Sectors: sbf}},
|
||||||
|
Loading…
Reference in New Issue
Block a user