Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions web/api/sector/sector.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ func (c *cfg) getSectors(w http.ResponseWriter, r *http.Request) {
}
sectors[i].Proving = chainy.active
if st.Expiration < head.Height() {
sectors[i].Flag = true // Flag expired sectors
delete(sectorIdx, sectorID{minerID, uint64(st.SectorNumber)})
sectors = append(sectors[:i], sectors[i+1:]...)
continue
}

dw, vp := .0, .0
Expand Down Expand Up @@ -256,6 +258,9 @@ func (c *cfg) getSectors(w http.ResponseWriter, r *http.Request) {
sectors[i].Deals = fmt.Sprintf("Market: %d, DDO: %d", f05, ddo)
} else {
// sector is on chain but not in db
if st.Expiration < head.Height() {
continue // skip expired ones
}
s := sector{
MinerID: minerID,
MinerAddress: maddr,
Expand All @@ -271,12 +276,6 @@ func (c *cfg) getSectors(w http.ResponseWriter, r *http.Request) {
}
sectors = append(sectors, s)
}
/*
info, err := c.Full.StateSectorGetInfo(r.Context(), minerToAddr[s], abi.SectorNumber(uint64(sectors[i].SectorNum)), headKey)
if err != nil {
sectors[i].IsValid = false
continue
}*/
}
}

Expand Down