routing: limit max parts if the invoice doesn't declare MPP support
This commit is contained in:
parent
fdd24fc1d6
commit
f574c150aa
@ -278,6 +278,12 @@ func (p *paymentSession) RequestRoute(maxAmt, feeLimit lnwire.MilliSatoshi,
|
|||||||
return nil, errNoPathFound
|
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.
|
// No splitting if this is the last shard.
|
||||||
isLastShard := activeShards+1 >= p.payment.MaxParts
|
isLastShard := activeShards+1 >= p.payment.MaxParts
|
||||||
if isLastShard {
|
if isLastShard {
|
||||||
|
Loading…
Reference in New Issue
Block a user