Plumb contexts through
This commit is contained in:
committed by
Jennifer Wang
parent
df943d3f4e
commit
5cb33b48da
@@ -35,11 +35,11 @@ func (a *PaychAPI) PaychGet(ctx context.Context, from, to address.Address, amt t
|
||||
}
|
||||
|
||||
func (a *PaychAPI) PaychAvailableFunds(ctx context.Context, ch address.Address) (*api.ChannelAvailableFunds, error) {
|
||||
return a.PaychMgr.AvailableFunds(ch)
|
||||
return a.PaychMgr.AvailableFunds(ctx, ch)
|
||||
}
|
||||
|
||||
func (a *PaychAPI) PaychAvailableFundsByFromTo(ctx context.Context, from, to address.Address) (*api.ChannelAvailableFunds, error) {
|
||||
return a.PaychMgr.AvailableFundsByFromTo(from, to)
|
||||
return a.PaychMgr.AvailableFundsByFromTo(ctx, from, to)
|
||||
}
|
||||
|
||||
func (a *PaychAPI) PaychGetWaitReady(ctx context.Context, sentinel cid.Cid) (address.Address, error) {
|
||||
@@ -47,7 +47,7 @@ func (a *PaychAPI) PaychGetWaitReady(ctx context.Context, sentinel cid.Cid) (add
|
||||
}
|
||||
|
||||
func (a *PaychAPI) PaychAllocateLane(ctx context.Context, ch address.Address) (uint64, error) {
|
||||
return a.PaychMgr.AllocateLane(ch)
|
||||
return a.PaychMgr.AllocateLane(ctx, ch)
|
||||
}
|
||||
|
||||
func (a *PaychAPI) PaychNewPayment(ctx context.Context, from, to address.Address, vouchers []api.VoucherSpec) (*api.PaymentInfo, error) {
|
||||
@@ -60,7 +60,7 @@ func (a *PaychAPI) PaychNewPayment(ctx context.Context, from, to address.Address
|
||||
return nil, err
|
||||
}
|
||||
|
||||
lane, err := a.PaychMgr.AllocateLane(ch.Channel)
|
||||
lane, err := a.PaychMgr.AllocateLane(ctx, ch.Channel)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -95,11 +95,11 @@ func (a *PaychAPI) PaychNewPayment(ctx context.Context, from, to address.Address
|
||||
}
|
||||
|
||||
func (a *PaychAPI) PaychList(ctx context.Context) ([]address.Address, error) {
|
||||
return a.PaychMgr.ListChannels()
|
||||
return a.PaychMgr.ListChannels(ctx)
|
||||
}
|
||||
|
||||
func (a *PaychAPI) PaychStatus(ctx context.Context, pch address.Address) (*api.PaychStatus, error) {
|
||||
ci, err := a.PaychMgr.GetChannelInfo(pch)
|
||||
ci, err := a.PaychMgr.GetChannelInfo(ctx, pch)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user