X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Ffeatures.rs;h=d24d32ba0fa039dd9356621ec66839b2c59ffc28;hb=8dde17773ace41d2d0bac2493abf2b01db67bd84;hp=7d4b86f5acabf6ae81d5f0df9b13f3090fb11d29;hpb=288fe0298ae0dd3550c4618e4f10d67d810aa997;p=rust-lightning diff --git a/lightning/src/ln/features.rs b/lightning/src/ln/features.rs index 7d4b86f5..d24d32ba 100644 --- a/lightning/src/ln/features.rs +++ b/lightning/src/ln/features.rs @@ -533,11 +533,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 } }