paych: Fix createPaych

This commit is contained in:
Łukasz Magiera
2019-09-16 20:08:24 +02:00
parent 55014becc8
commit b88d23fd8b
5 changed files with 27 additions and 8 deletions
+1
View File
@@ -95,6 +95,7 @@ func (a *API) ClientStartDeal(ctx context.Context, data cid.Cid, miner address.A
}
head := a.Chain.GetHeaviestTipSet()
payment, err := a.PaychNewPayment(ctx, self, miner, total, extra, head.Height()+blocksDuration, head.Height()+blocksDuration)
if err != nil {
return nil, err
+2 -2
View File
@@ -43,8 +43,8 @@ func (a *PaychAPI) PaychAllocateLane(ctx context.Context, ch address.Address) (u
}
func (a *PaychAPI) PaychNewPayment(ctx context.Context, from, to address.Address, amount types.BigInt, extra *types.ModVerifyParams, tl uint64, minClose uint64) (*api.PaymentInfo, error) {
// TODO: Fix free fund tracking in PaychGet, pass amount
ch, err := a.PaychGet(ctx, from, to, types.NewInt(0))
// TODO: Fix free fund tracking in PaychGet
ch, err := a.PaychGet(ctx, from, to, amount)
if err != nil {
return nil, err
}