From 805641adf5e771e4f29375da547bdd988ccf8c24 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Thu, 16 Apr 2020 15:08:07 +0200 Subject: [PATCH] routing: do not split payment if destination does not support mpp --- routing/payment_session.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/routing/payment_session.go b/routing/payment_session.go index 6c4677686..f5a49eff0 100644 --- a/routing/payment_session.go +++ b/routing/payment_session.go @@ -243,6 +243,15 @@ func (p *paymentSession) RequestRoute(maxAmt, feeLimit lnwire.MilliSatoshi, switch { case err == errNoPathFound: + // Don't split if this is a legacy payment without mpp + // record. + if p.payment.PaymentAddr == nil { + p.log.Debugf("not splitting because payment " + + "address is unspecified") + + return nil, errNoPathFound + } + // No splitting if this is the last shard. isLastShard := activeShards+1 >= p.payment.MaxShards if isLastShard {