mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-01 11:00:51 +02:00
routerrpc: limit max parts if the invoice doesn't declare MPP support
This commit is contained in:
@ -648,6 +648,10 @@ func (r *RouterBackend) extractIntentFromSendRequest(
|
|||||||
payIntent.Amount = *payReq.MilliSat
|
payIntent.Amount = *payReq.MilliSat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !payReq.Features.HasFeature(lnwire.MPPOptional) {
|
||||||
|
payIntent.MaxParts = 1
|
||||||
|
}
|
||||||
|
|
||||||
copy(payIntent.PaymentHash[:], payReq.PaymentHash[:])
|
copy(payIntent.PaymentHash[:], payReq.PaymentHash[:])
|
||||||
destKey := payReq.Destination.SerializeCompressed()
|
destKey := payReq.Destination.SerializeCompressed()
|
||||||
copy(payIntent.Target[:], destKey)
|
copy(payIntent.Target[:], destKey)
|
||||||
|
Reference in New Issue
Block a user