mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-09 18:43:57 +02:00
rpcserver+routerrpc: thread features + payment addr to SendPayment
This commit is contained in:
@@ -3241,6 +3241,8 @@ type rpcPaymentIntent struct {
|
||||
routeHints [][]zpay32.HopHint
|
||||
outgoingChannelID *uint64
|
||||
lastHop *route.Vertex
|
||||
destFeatures *lnwire.FeatureVector
|
||||
paymentAddr *[32]byte
|
||||
payReq []byte
|
||||
|
||||
destCustomRecords record.CustomSet
|
||||
@@ -3370,6 +3372,8 @@ func (r *rpcServer) extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPayme
|
||||
payIntent.cltvDelta = uint16(payReq.MinFinalCLTVExpiry())
|
||||
payIntent.routeHints = payReq.RouteHints
|
||||
payIntent.payReq = []byte(rpcPayReq.PaymentRequest)
|
||||
payIntent.destFeatures = payReq.Features
|
||||
payIntent.paymentAddr = payReq.PaymentAddr
|
||||
|
||||
if err := validateDest(payIntent.dest); err != nil {
|
||||
return payIntent, err
|
||||
@@ -3492,6 +3496,8 @@ func (r *rpcServer) dispatchPaymentIntent(
|
||||
PaymentRequest: payIntent.payReq,
|
||||
PayAttemptTimeout: routing.DefaultPayAttemptTimeout,
|
||||
DestCustomRecords: payIntent.destCustomRecords,
|
||||
DestFeatures: payIntent.destFeatures,
|
||||
PaymentAddr: payIntent.paymentAddr,
|
||||
}
|
||||
|
||||
preImage, route, routerErr = r.server.chanRouter.SendPayment(
|
||||
|
Reference in New Issue
Block a user