storageminer: Skip uninitialized sectors in SectorsList

This commit is contained in:
Łukasz Magiera 2021-02-16 17:34:06 +01:00
parent fc5e243c92
commit 46b880a6b9

View File

@ -219,6 +219,10 @@ func (sm *StorageMinerAPI) SectorsList(context.Context) ([]abi.SectorNumber, err
out := make([]abi.SectorNumber, len(sectors))
for i, sector := range sectors {
if sector.State == sealing.UndefinedSectorState {
continue // sector ID not set yet
}
out[i] = sector.SectorNumber
}
return out, nil