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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2025-02-14 21:00:43 +10:30
parent c718e35359
commit e2be010cbb
2 changed files with 10 additions and 1 deletions

View file

@ -24,7 +24,10 @@ const char *feature_place_names[] = {
NULL, NULL,
"node", "node",
"channel", "channel",
"invoice" "invoice",
"bolt12_offer",
"bolt12_invreq",
"bolt12_invoice",
}; };
static const struct feature_style feature_styles[] = { static const struct feature_style feature_styles[] = {

View file

@ -1475,6 +1475,12 @@ static struct feature_set *json_to_feature_set(struct plugin *plugin,
p = CHANNEL_FEATURE; p = CHANNEL_FEATURE;
else if (json_tok_streq(buf, t, "invoice")) else if (json_tok_streq(buf, t, "invoice"))
p = BOLT11_FEATURE; 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 else
continue; continue;
fset->bits[p] = json_tok_bin_from_hex(fset, buf, t + 1); fset->bits[p] = json_tok_bin_from_hex(fset, buf, t + 1);