mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-28 17:53:30 +02:00
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 {
|
switch {
|
||||||
case err == errNoPathFound:
|
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.
|
// No splitting if this is the last shard.
|
||||||
isLastShard := activeShards+1 >= p.payment.MaxShards
|
isLastShard := activeShards+1 >= p.payment.MaxShards
|
||||||
if isLastShard {
|
if isLastShard {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user