routing: pass BlindedPaymentPathSet around everywhere

Building on from the previous commit, here we pass the PathSet around
everywhere where we previously passed around the single BlindedPayment.
This commit is contained in:
Elle Mouton
2024-05-15 15:08:19 +02:00
parent 3d5f20b70f
commit 4a22ec8413
7 changed files with 94 additions and 92 deletions

View File

@@ -5105,7 +5105,7 @@ type rpcPaymentIntent struct {
paymentAddr *[32]byte
payReq []byte
metadata []byte
blindedPayment *routing.BlindedPayment
blindedPathSet *routing.BlindedPaymentPathSet
destCustomRecords record.CustomSet
@@ -5248,7 +5248,7 @@ func (r *rpcServer) extractPaymentIntent(rpcPayReq *rpcPaymentRequest) (rpcPayme
if err != nil {
return payIntent, err
}
payIntent.blindedPayment = pathSet.GetPath()
payIntent.blindedPathSet = pathSet
// Replace the destination node with the target public
// key of the blinded path set.
@@ -5417,7 +5417,7 @@ func (r *rpcServer) dispatchPaymentIntent(
DestFeatures: payIntent.destFeatures,
PaymentAddr: payIntent.paymentAddr,
Metadata: payIntent.metadata,
BlindedPayment: payIntent.blindedPayment,
BlindedPathSet: payIntent.blindedPathSet,
// Don't enable multi-part payments on the main rpc.
// Users need to use routerrpc for that.