routing+channeldb: send payment metadata from invoice

This commit is contained in:
Joost Jager
2021-10-04 09:33:12 +02:00
parent 135e27ddd3
commit 9195f29e61
17 changed files with 1580 additions and 1401 deletions

View File

@@ -444,6 +444,7 @@ func (r *RouterBackend) MarshallRoute(route *route.Route) (*lnrpc.Route, error)
CustomRecords: hop.CustomRecords,
TlvPayload: !hop.LegacyPayload,
MppRecord: mpp,
Metadata: hop.Metadata,
}
incomingAmt = hop.AmtToForward
}
@@ -766,6 +767,7 @@ func (r *RouterBackend) extractIntentFromSendRequest(
payIntent.DestFeatures = payReq.Features
payIntent.PaymentAddr = payAddr
payIntent.PaymentRequest = []byte(rpcPayReq.PaymentRequest)
payIntent.Metadata = payReq.Metadata
} else {
// Otherwise, If the payment request field was not specified
// (and a custom route wasn't specified), construct the payment