Update wdpost_run.go
if some unrecovered sectors can not recovered (such as cache file is missing) , miner should not send message "DeclareFaultsRecovered"
This commit is contained in:
parent
79e93760b7
commit
4e12c4cb69
@ -151,6 +151,15 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, deadline
|
||||
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}},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user