itest: payment failure reason canceled
This commit is contained in:
4 files changed
+171
-1
No files matched your search
+16
-1
@@ -36,7 +36,7 @@ func (h *HarnessRPC) SendPayment(
|
||||
req *routerrpc.SendPaymentRequest) PaymentClient {
|
||||
|
||||
// SendPayment needs to have the context alive for the entire test case
|
||||
// as the router relies on the context to propagate HTLCs. Thus we use
|
||||
// as the router relies on the context to propagate HTLCs. Thus, we use
|
||||
// runCtx here instead of a timeout context.
|
||||
stream, err := h.Router.SendPaymentV2(h.runCtx, req)
|
||||
h.NoError(err, "SendPaymentV2")
|
||||
@@ -44,6 +44,21 @@ func (h *HarnessRPC) SendPayment(
|
||||
return stream
|
||||
}
|
||||
|
||||
// SendPaymentWithContext sends a payment using the given node and payment
|
||||
// request and does so with the passed in context.
|
||||
func (h *HarnessRPC) SendPaymentWithContext(context context.Context,
|
||||
req *routerrpc.SendPaymentRequest) PaymentClient {
|
||||
|
||||
require.NotNil(h.T, context, "context must not be nil")
|
||||
|
||||
// SendPayment needs to have the context alive for the entire test case
|
||||
// as the router relies on the context to propagate HTLCs.
|
||||
stream, err := h.Router.SendPaymentV2(context, req)
|
||||
h.NoError(err, "SendPaymentV2")
|
||||
|
||||
return stream
|
||||
}
|
||||
|
||||
type HtlcEventsClient routerrpc.Router_SubscribeHtlcEventsClient
|
||||
|
||||
// SubscribeHtlcEvents makes a subscription to the HTLC events and returns a
|
||||
|
||||
Reference in new issue
Block a user