X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Ffeatures.rs;h=41b15c97c9ae63c5aaae4f4f3ef1a810da11efaa;hb=9a3914dee6e3634045a75a273433921e79cdb4f7;hp=b8087546c7445060230a5ad776a9b3f13c113d37;hpb=7a78998552b1d3c2d97f337a7d5aaf7fe1aa70b4;p=rust-lightning diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index b8087546..41b15c97 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -535,11 +535,17 @@ impl InvoiceFeatures { /// [`PaymentParameters::for_keysend`], thus omitting the need for payers to manually construct an /// `InvoiceFeatures` for [`find_route`]. /// + /// MPP keysend is not widely supported yet, so we parameterize support to allow the user to + /// choose whether their router should find multi-part routes. + /// /// [`PaymentParameters::for_keysend`]: crate::routing::router::PaymentParameters::for_keysend /// [`find_route`]: crate::routing::router::find_route - pub(crate) fn for_keysend() -> InvoiceFeatures { + pub(crate) fn for_keysend(allow_mpp: bool) -> InvoiceFeatures { let mut res = InvoiceFeatures::empty(); res.set_variable_length_onion_optional(); + if allow_mpp { + res.set_basic_mpp_optional(); + } res } }