2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-04 06:00:21 +00:00

Merge pull request #183 from joostjager/routerrpc-v2

lndclient: move to V2 payment methods
This commit is contained in:
Joost Jager 2020-04-22 14:11:11 +02:00 committed by GitHub
commit 23d646ea6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 8 deletions

2
go.mod
View File

@ -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

7
go.sum
View File

@ -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=

View File

@ -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)