rpcserver+routerrpc: thread features + payment addr to SendPayment
This commit is contained in:
4 files changed
+27
-3
No files matched your search
@@ -98,6 +98,8 @@ func (p *paymentSession) RequestRoute(payment *LightningPayment,
|
||||
LastHop: payment.LastHop,
|
||||
CltvLimit: cltvLimit,
|
||||
DestCustomRecords: payment.DestCustomRecords,
|
||||
DestFeatures: payment.DestFeatures,
|
||||
PaymentAddr: payment.PaymentAddr,
|
||||
}
|
||||
|
||||
// We'll also obtain a set of bandwidthHints from the lower layer for
|
||||
@@ -131,9 +133,10 @@ func (p *paymentSession) RequestRoute(payment *LightningPayment,
|
||||
route, err := newRoute(
|
||||
sourceVertex, path, height,
|
||||
finalHopParams{
|
||||
amt: payment.Amount,
|
||||
cltvDelta: finalCltvDelta,
|
||||
records: payment.DestCustomRecords,
|
||||
amt: payment.Amount,
|
||||
cltvDelta: finalCltvDelta,
|
||||
records: payment.DestCustomRecords,
|
||||
paymentAddr: payment.PaymentAddr,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -1601,6 +1601,19 @@ type LightningPayment struct {
|
||||
// is reached. If nil, any node may be used.
|
||||
LastHop *route.Vertex
|
||||
|
||||
// DestFeatures specifies the set of features we assume the final node
|
||||
// has for pathfinding. Typically these will be taken directly from an
|
||||
// invoice, but they can also be manually supplied or assumed by the
|
||||
// sender. If a nil feature vector is provided, the router will try to
|
||||
// fallback to the graph in order to load a feature vector for a node in
|
||||
// the public graph.
|
||||
DestFeatures *lnwire.FeatureVector
|
||||
|
||||
// PaymentAddr is the payment address specified by the receiver. This
|
||||
// field should be a random 32-byte nonce presented in the receiver's
|
||||
// invoice to prevent probing of the destination.
|
||||
PaymentAddr *[32]byte
|
||||
|
||||
// PaymentRequest is an optional payment request that this payment is
|
||||
// attempting to complete.
|
||||
PaymentRequest []byte
|
||||
|
||||
Reference in new issue
Block a user