multi: update PaymentAddr to use fn.Option

Since it is allowed to not be set and so can lead to nil deref panics if
it is a pointer.
This commit is contained in:
Elle Mouton
2024-09-24 12:36:15 +09:00
parent 84c91f701c
commit 7dc86acb8c
14 changed files with 87 additions and 70 deletions

View File

@@ -187,7 +187,7 @@ func (c *integratedRoutingContext) testPayment(maxParts uint32,
FinalCLTVDelta: uint16(c.finalExpiry),
FeeLimit: lnwire.MaxMilliSatoshi,
Target: c.target.pubkey,
PaymentAddr: &paymentAddr,
PaymentAddr: fn.Some(paymentAddr),
DestFeatures: lnwire.NewFeatureVector(
baseFeatureBits, lnwire.Features,
),