diff --git a/curiosrc/web/api/sector/sector.go b/curiosrc/web/api/sector/sector.go index ba71f0cbe..e3b4b3c15 100644 --- a/curiosrc/web/api/sector/sector.go +++ b/curiosrc/web/api/sector/sector.go @@ -88,6 +88,7 @@ func (c *cfg) getSectors(w http.ResponseWriter, r *http.Request) { //ExpectedDayReward abi.TokenAmount //SealProof abi.RegisteredSealProof } + type piece struct { Size int64 `db:"piece_size"` DealID uint64 `db:"f05_deal_id"` @@ -151,6 +152,7 @@ func (c *cfg) getSectors(w http.ResponseWriter, r *http.Request) { if st.Expiration < head.Height() { sectors[i].Flag = true // Flag expired sectors } + dw, vp := .0, .0 f05, ddo := 0, 0 var pi []piece @@ -186,6 +188,7 @@ func (c *cfg) getSectors(w http.ResponseWriter, r *http.Request) { dw = float64(big.Div(rdw, big.NewInt(int64(st.Expiration-st.Activation))).Uint64()) vp = float64(big.Div(big.Mul(st.VerifiedDealWeight, big.NewInt(verifiedPowerGainMul)), big.NewInt(int64(st.Expiration-st.Activation))).Uint64()) for _, deal := range st.DealIDs { + if deal > 0 { f05++ } diff --git a/curiosrc/web/hapi/simpleinfo.go b/curiosrc/web/hapi/simpleinfo.go index 3bab1c46c..287e11233 100644 --- a/curiosrc/web/hapi/simpleinfo.go +++ b/curiosrc/web/hapi/simpleinfo.go @@ -384,7 +384,7 @@ func (a *app) sectorInfo(w http.ResponseWriter, r *http.Request) { a.executePageTemplate(w, "sector_info", "Sector Info", mi) } -var templateDev = os.Getenv("LOTUS_WEB_DEV") == "1" +var templateDev = os.Getenv("CURIO_WEB_DEV") == "1" func (a *app) executeTemplate(w http.ResponseWriter, name string, data interface{}) { if templateDev { diff --git a/curiosrc/web/hapi/web/pipeline_porep_sectors.gohtml b/curiosrc/web/hapi/web/pipeline_porep_sectors.gohtml index 3949de8e2..82f0ad196 100644 --- a/curiosrc/web/hapi/web/pipeline_porep_sectors.gohtml +++ b/curiosrc/web/hapi/web/pipeline_porep_sectors.gohtml @@ -1,4 +1,62 @@ {{define "sector_porep_state"}} +