From e0b987f403ee8e606681a41e7a75ee92d19e47d3 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Wed, 22 Apr 2020 14:01:44 +0200 Subject: [PATCH] lndclient: move to V2 payment methods Otherwise mpp isn't supported. --- go.mod | 2 +- go.sum | 7 +++---- lndclient/router_client.go | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 22942e8..fecfa95 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.12.2 github.com/jessevdk/go-flags v1.4.0 github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d - github.com/lightningnetwork/lnd v0.10.0-beta.rc1 + github.com/lightningnetwork/lnd v0.10.0-beta.rc4 github.com/lightningnetwork/lnd/queue v1.0.3 github.com/urfave/cli v1.20.0 golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 diff --git a/go.sum b/go.sum index afc06cf..26db812 100644 --- a/go.sum +++ b/go.sum @@ -148,10 +148,9 @@ github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce7 github.com/lightninglabs/protobuf-hex-display v1.3.3-0.20191212020323-b444784ce75d/go.mod h1:KDb67YMzoh4eudnzClmvs2FbiLG9vxISmLApUkCa4uI= github.com/lightningnetwork/lightning-onion v1.0.1 h1:qChGgS5+aPxFeR6JiUsGvanei1bn6WJpYbvosw/1604= github.com/lightningnetwork/lightning-onion v1.0.1/go.mod h1:rigfi6Af/KqsF7Za0hOgcyq2PNH4AN70AaMRxcJkff4= -github.com/lightningnetwork/lnd v0.10.0-beta.rc1 h1:eCLOYu+Erw+GIxMJHbkTRn23eBVN3s7u188iyw3747Y= -github.com/lightningnetwork/lnd v0.10.0-beta.rc1/go.mod h1:UNd+jGvZbtHFAR4syN6ab2euqh5DNzbVjjomZZFlCEY= -github.com/lightningnetwork/lnd/cert v1.0.1 h1:D+FOL2J/MzoolaWSEZJZc5Qb7vqy6P8IX1HGzqHWnQM= -github.com/lightningnetwork/lnd/cert v1.0.1/go.mod h1:fmtemlSMf5t4hsQmcprSoOykypAPp+9c+0d0iqTScMo= +github.com/lightningnetwork/lnd v0.10.0-beta.rc4 h1:gFdGWc+1nQDJj3nQZadsJL6Vsl8E6J2UxJUpSWLztug= +github.com/lightningnetwork/lnd v0.10.0-beta.rc4/go.mod h1:vyc0duSWZi+xwk4hC2JqyTOKhVAS3I2/8AArCUdaau4= +github.com/lightningnetwork/lnd/cert v1.0.2/go.mod h1:fmtemlSMf5t4hsQmcprSoOykypAPp+9c+0d0iqTScMo= github.com/lightningnetwork/lnd/queue v1.0.1 h1:jzJKcTy3Nj5lQrooJ3aaw9Lau3I0IwvQR5sqtjdv2R0= github.com/lightningnetwork/lnd/queue v1.0.1/go.mod h1:vaQwexir73flPW43Mrm7JOgJHmcEFBWWSl9HlyASoms= github.com/lightningnetwork/lnd/queue v1.0.3 h1:5ufYVE7lh9GJnL1wOoeO3bZ3aAHWNnkNFHP7W1+NiJ8= diff --git a/lndclient/router_client.go b/lndclient/router_client.go index a7b722b..510373d 100644 --- a/lndclient/router_client.go +++ b/lndclient/router_client.go @@ -151,7 +151,7 @@ func (r *routerClient) SendPayment(ctx context.Context, rpcReq.RouteHints = routeHints } - stream, err := r.client.SendPayment(rpcCtx, rpcReq) + stream, err := r.client.SendPaymentV2(rpcCtx, rpcReq) if err != nil { return nil, nil, err } @@ -165,7 +165,7 @@ func (r *routerClient) TrackPayment(ctx context.Context, hash lntypes.Hash) (chan PaymentStatus, chan error, error) { ctx = r.routerKitMac.WithMacaroonAuth(ctx) - stream, err := r.client.TrackPayment( + stream, err := r.client.TrackPaymentV2( ctx, &routerrpc.TrackPaymentRequest{ PaymentHash: hash[:], }, @@ -180,7 +180,7 @@ func (r *routerClient) TrackPayment(ctx context.Context, // trackPayment takes an update stream from either a SendPayment or a // TrackPayment rpc call and converts it into distinct update and error streams. func (r *routerClient) trackPayment(ctx context.Context, - stream routerrpc.Router_TrackPaymentClient) (chan PaymentStatus, + stream routerrpc.Router_TrackPaymentV2Client) (chan PaymentStatus, chan error, error) { statusChan := make(chan PaymentStatus)