X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Fln%2Ffeatures.rs;h=d24d32ba0fa039dd9356621ec66839b2c59ffc28;hb=9db962c7192643d10722b7b675d45068e14407c8;hp=7d4b86f5acabf6ae81d5f0df9b13f3090fb11d29;hpb=5c89d019050a4b2dd68610d2e59d45acbfee5775;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 } }