Add command to sort miners by deal counts

This commit is contained in:
Jeromy
2020-05-21 15:52:20 -07:00
parent 0d3f602d58
commit 805686be2e
2 changed files with 50 additions and 1 deletions
+7 -1
View File
@@ -445,7 +445,13 @@ func (a *StateAPI) StateMarketDeals(ctx context.Context, tsk types.TipSetKey) (m
var s market.DealState
if err := sa.Get(ctx, i, &s); err != nil {
return err
if err != nil {
if _, ok := err.(*amt.ErrNotFound); !ok {
return xerrors.Errorf("failed to get state for deal in proposals array: %w", err)
}
s.SectorStartEpoch = -1
}
}
out[strconv.FormatInt(int64(i), 10)] = api.MarketDeal{
Proposal: d,