routing: do not split payment if destination does not support mpp
This commit is contained in:
parent
9bd7eb74b6
commit
805641adf5
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user