sealing pipeline: Get allocationId with StateApi

This commit is contained in:
Łukasz Magiera
2022-10-12 13:54:03 -04:00
committed by Aayush
parent 0af9888b12
commit dc102f076a
19 changed files with 82 additions and 36 deletions
+4 -1
View File
@@ -786,13 +786,16 @@ func (a *StateAPI) StateGetAllocationForPendingDeal(ctx context.Context, dealId
if err != nil {
return nil, err
}
if allocationId == nil {
return nil, nil
}
dealState, err := a.StateMarketStorageDeal(ctx, dealId, tsk)
if err != nil {
return nil, err
}
return a.StateGetAllocation(ctx, dealState.Proposal.Client, allocationId, tsk)
return a.StateGetAllocation(ctx, dealState.Proposal.Client, *allocationId, tsk)
}
func (a *StateAPI) StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) {