Skip to content

Commit ae89dca

Browse files
committed
xpay: in future, don't MPP to pay bolt12 invoices unless invoice explicitly says so.
We don't want to enable this yet, since we only just fixed CLN this release! Signed-off-by: Rusty Russell <[email protected]>
1 parent 03e7e65 commit ae89dca

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/developers-guide/deprecations.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ hidden: false
3737
| close.tx | Field | v24.11 | v25.11 | Use txs array instead |
3838
| close.txid | Field | v24.11 | v25.11 | Use txids array instead |
3939
| experimental-offers | Config | v24.11 | v25.05 | Now the default |
40+
| xpay.ignore_bolt12_mpp | Field | v25.05 | v25.11 | Try MPP even if the BOLT12 invoice doesn't explicitly allow it (CLN didn't until 25.02) |
4041

4142
Inevitably there are features which need to change: either to be generalized, or removed when they can no longer be supported.
4243

plugins/xpay/xpay.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,10 @@ static struct command_result *json_xpay_core(struct command *cmd,
15601560
if (payment->payinfos[i]->cltv_expiry_delta > payment->final_cltv)
15611561
payment->final_cltv = payment->payinfos[i]->cltv_expiry_delta;
15621562
}
1563-
payment->disable_mpp = false;
1563+
/* We will start honoring this flag in future */
1564+
payment->disable_mpp = !feature_offered(b12inv->invoice_features, OPT_BASIC_MPP);
1565+
if (payment->disable_mpp && command_deprecated_in_ok(cmd, "ignore_bolt12_mpp", "v25.05", "v25.11"))
1566+
payment->disable_mpp = false;
15641567
} else {
15651568
struct bolt11 *b11
15661569
= bolt11_decode(tmpctx, payment->invstring,

0 commit comments

Comments
 (0)