routing: do not split payment if destination does not support mpp

This commit is contained in:
Joost Jager 2020-04-16 15:08:07 +02:00
parent 9bd7eb74b6
commit 805641adf5
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

@ -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 {