routing: check payment.DestFeatures against nil

This commit is contained in:
yyforyongyu 2021-03-16 19:02:12 +08:00
parent fa4155c126
commit 541fbbb054
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

@ -290,6 +290,12 @@ func (p *paymentSession) RequestRoute(maxAmt, feeLimit lnwire.MilliSatoshi,
return nil, errNoPathFound
}
if p.payment.DestFeatures == nil {
p.log.Debug("Not splitting because " +
"destination DestFeatures is nil")
return nil, errNoPathFound
}
if !p.payment.DestFeatures.HasFeature(lnwire.MPPOptional) {
p.log.Debug("not splitting because " +
"destination doesn't declare MPP")