From f574c150aa21ede437f04d62fc748e724c6cf7bf Mon Sep 17 00:00:00 2001 From: Juan Pablo Civile Date: Fri, 15 Jan 2021 14:56:32 -0300 Subject: [PATCH] routing: limit max parts if the invoice doesn't declare MPP support --- routing/payment_session.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 {