mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-17 13:06:51 +02:00
Merge pull request #151 from joostjager/last-hop-restriction
lndclient: add last hop restriction
This commit is contained in:
commit
1ebba410ea
1 changed files with 7 additions and 0 deletions
|
|
@ -77,6 +77,10 @@ type SendPaymentRequest struct {
|
|||
// together and sorted in forward order in order to reach the
|
||||
// destination successfully.
|
||||
RouteHints [][]zpay32.HopHint
|
||||
|
||||
// LastHopPubkey is the pubkey of the last hop of the route taken
|
||||
// for this payment. If empty, any hop may be used.
|
||||
LastHopPubkey *route.Vertex
|
||||
}
|
||||
|
||||
// routerClient is a wrapper around the generated routerrpc proxy.
|
||||
|
|
@ -111,6 +115,9 @@ func (r *routerClient) SendPayment(ctx context.Context,
|
|||
if request.OutgoingChannel != nil {
|
||||
rpcReq.OutgoingChanId = *request.OutgoingChannel
|
||||
}
|
||||
if request.LastHopPubkey != nil {
|
||||
rpcReq.LastHopPubkey = request.LastHopPubkey[:]
|
||||
}
|
||||
|
||||
// Only if there is no payment request set, we will parse the individual
|
||||
// payment parameters.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue