mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-08 23:01:53 +02:00
lntest: add HtlcModifier
support to node RPC harness
This commit enhances the itest LND node harness to include support for the new `HtlcModifier` RPC endpoint. At the same time we move another method to the correct file.
This commit is contained in:
@@ -267,3 +267,19 @@ func (h *HarnessRPC) TrackPayments(
|
||||
|
||||
return resp
|
||||
}
|
||||
|
||||
type TrackPaymentClient routerrpc.Router_TrackPaymentV2Client
|
||||
|
||||
// TrackPaymentV2 creates a subscription client for given invoice and
|
||||
// asserts its creation.
|
||||
func (h *HarnessRPC) TrackPaymentV2(payHash []byte) TrackPaymentClient {
|
||||
req := &routerrpc.TrackPaymentRequest{PaymentHash: payHash}
|
||||
|
||||
// TrackPaymentV2 needs to have the context alive for the entire test
|
||||
// case as the returned client will be used for send and receive events
|
||||
// stream. Thus we use runCtx here instead of a timeout context.
|
||||
client, err := h.Router.TrackPaymentV2(h.runCtx, req)
|
||||
h.NoError(err, "TrackPaymentV2")
|
||||
|
||||
return client
|
||||
}
|
||||
|
Reference in New Issue
Block a user