From e2be010cbb08fc0d0c0bfd7c7ba95307231f2995 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 14 Feb 2025 21:00:43 +1030 Subject: [PATCH] offers: correctly advertize MPP in invoice features. Turns out we weren't wiring them through! And libplugin wasn't reading them anyway. Changelog-Fixed: lightningd: tell plugins our bolt12 features (so our bolt12 invoices explicitly allow MPP). Signed-off-by: Rusty Russell --- common/features.c | 5 ++++- plugins/libplugin.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/features.c b/common/features.c index 41daa4055..88207aa66 100644 --- a/common/features.c +++ b/common/features.c @@ -24,7 +24,10 @@ const char *feature_place_names[] = { NULL, "node", "channel", - "invoice" + "invoice", + "bolt12_offer", + "bolt12_invreq", + "bolt12_invoice", }; static const struct feature_style feature_styles[] = { diff --git a/plugins/libplugin.c b/plugins/libplugin.c index 51936be1c..c11be93ca 100644 --- a/plugins/libplugin.c +++ b/plugins/libplugin.c @@ -1475,6 +1475,12 @@ static struct feature_set *json_to_feature_set(struct plugin *plugin, p = CHANNEL_FEATURE; else if (json_tok_streq(buf, t, "invoice")) p = BOLT11_FEATURE; + else if (json_tok_streq(buf, t, "bolt12_offer")) + p = BOLT12_OFFER_FEATURE; + else if (json_tok_streq(buf, t, "bolt12_invreq")) + p = BOLT12_INVREQ_FEATURE; + else if (json_tok_streq(buf, t, "bolt12_invoice")) + p = BOLT12_INVOICE_FEATURE; else continue; fset->bits[p] = json_tok_bin_from_hex(fset, buf, t + 1);