diff --git a/lnrpc/routerrpc/router_backend.go b/lnrpc/routerrpc/router_backend.go index 96df0745..922dec4a 100644 --- a/lnrpc/routerrpc/router_backend.go +++ b/lnrpc/routerrpc/router_backend.go @@ -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) diff --git a/routing/payment_session.go b/routing/payment_session.go index 2d7ef8bf..4b766d4c 100644 --- a/routing/payment_session.go +++ b/routing/payment_session.go @@ -278,6 +278,12 @@ func (p *paymentSession) RequestRoute(maxAmt, feeLimit lnwire.MilliSatoshi, return nil, errNoPathFound } + if !p.payment.DestFeatures.HasFeature(lnwire.MPPOptional) { + p.log.Debug("not splitting because destination doesn't declare MPP") + + return nil, errNoPathFound + } + // No splitting if this is the last shard. isLastShard := activeShards+1 >= p.payment.MaxParts if isLastShard {