Merge pull request #2114 from filecoin-project/fix/state-mkt-participants

state: Get correct locked table in StateMarketParticipants
This commit is contained in:
Łukasz Magiera 2020-06-23 21:21:43 +02:00 committed by GitHub
commit 28e3c863bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -425,7 +425,7 @@ func (a *StateAPI) StateMarketParticipants(ctx context.Context, tsk types.TipSet
if err != nil { if err != nil {
return nil, err return nil, err
} }
locked, err := hamt.LoadNode(ctx, cst, state.EscrowTable, hamt.UseTreeBitWidth(5)) locked, err := hamt.LoadNode(ctx, cst, state.LockedTable, hamt.UseTreeBitWidth(5))
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -489,13 +489,11 @@ func (a *StateAPI) StateMarketDeals(ctx context.Context, tsk types.TipSetKey) (m
var s market.DealState var s market.DealState
if err := sa.Get(ctx, i, &s); err != nil { if err := sa.Get(ctx, i, &s); err != nil {
if err != nil { if _, ok := err.(*amt.ErrNotFound); !ok {
if _, ok := err.(*amt.ErrNotFound); !ok { return xerrors.Errorf("failed to get state for deal in proposals array: %w", err)
return xerrors.Errorf("failed to get state for deal in proposals array: %w", err)
}
s.SectorStartEpoch = -1
} }
s.SectorStartEpoch = -1
} }
out[strconv.FormatInt(int64(i), 10)] = api.MarketDeal{ out[strconv.FormatInt(int64(i), 10)] = api.MarketDeal{
Proposal: d, Proposal: d,