Count deals from sealed sectors only

This commit is contained in:
Peter Rabbitson 2020-12-03 19:15:55 +00:00 committed by Peter Rabbitson
parent 88bd757024
commit 2514c96cff

View File

@ -245,11 +245,13 @@ var rollupDealStatsCmd = &cli.Command{
for dealID, dealInfo := range deals {
// Counting no-longer-active deals as per Pooja's request
// // https://github.com/filecoin-project/specs-actors/blob/v0.9.9/actors/builtin/market/deal.go#L81-L85
// if d.State.SectorStartEpoch < 0 {
// continue
// }
// Only count deals that have properly started, not past/future ones
// https://github.com/filecoin-project/specs-actors/blob/v0.9.9/actors/builtin/market/deal.go#L81-L85
// Bail on 0 as well in case SectorStartEpoch is uninitialized due to some bug
if dealInfo.State.SectorStartEpoch <= 0 ||
dealInfo.State.SectorStartEpoch > head.Height() {
continue
}
clientAddr, found := resolvedWallets[dealInfo.Proposal.Client]
if !found {