Merge pull request #4924 from champo/check_payreq_multipart

routerrpc,routing: limit max parts if the invoice doesn't declare MPP support
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2021-02-03 16:53:49 -08:00
commit 301f1a870e
2 files changed
+10

No files matched your search

+4
View File
@@ -648,6 +648,10 @@ func (r *RouterBackend) extractIntentFromSendRequest(
payIntent.Amount = *payReq.MilliSat
}
if !payReq.Features.HasFeature(lnwire.MPPOptional) {
payIntent.MaxParts = 1
}
copy(payIntent.PaymentHash[:], payReq.PaymentHash[:])
destKey := payReq.Destination.SerializeCompressed()
copy(payIntent.Target[:], destKey)