Skip to content

Commit 77e8e19

Browse files
committed
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 <[email protected]>
1 parent ae89dca commit 77e8e19

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

common/features.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ const char *feature_place_names[] = {
2424
NULL,
2525
"node",
2626
"channel",
27-
"invoice"
27+
"invoice",
28+
"bolt12_offer",
29+
"bolt12_invreq",
30+
"bolt12_invoice",
2831
};
2932

3033
static const struct feature_style feature_styles[] = {

plugins/libplugin.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,12 @@ static struct feature_set *json_to_feature_set(struct plugin *plugin,
14751475
p = CHANNEL_FEATURE;
14761476
else if (json_tok_streq(buf, t, "invoice"))
14771477
p = BOLT11_FEATURE;
1478+
else if (json_tok_streq(buf, t, "bolt12_offer"))
1479+
p = BOLT12_OFFER_FEATURE;
1480+
else if (json_tok_streq(buf, t, "bolt12_invreq"))
1481+
p = BOLT12_INVREQ_FEATURE;
1482+
else if (json_tok_streq(buf, t, "bolt12_invoice"))
1483+
p = BOLT12_INVOICE_FEATURE;
14781484
else
14791485
continue;
14801486
fset->bits[p] = json_tok_bin_from_hex(fset, buf, t + 1);

0 commit comments

Comments
 (0)