From c718e35359ed0e0cc9e3778bca5ddaf06f7e223d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 14 Feb 2025 21:00:43 +1030 Subject: [PATCH] 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 --- doc/developers-guide/deprecations.md | 1 + plugins/xpay/xpay.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/developers-guide/deprecations.md b/doc/developers-guide/deprecations.md index ebe6ae1b0..e82670369 100644 --- a/doc/developers-guide/deprecations.md +++ b/doc/developers-guide/deprecations.md @@ -37,6 +37,7 @@ hidden: false | close.tx | Field | v24.11 | v25.11 | Use txs array instead | | close.txid | Field | v24.11 | v25.11 | Use txids array instead | | experimental-offers | Config | v24.11 | v25.05 | Now the default | +| 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) | Inevitably there are features which need to change: either to be generalized, or removed when they can no longer be supported. diff --git a/plugins/xpay/xpay.c b/plugins/xpay/xpay.c index fca3f6834..bf1e290b4 100644 --- a/plugins/xpay/xpay.c +++ b/plugins/xpay/xpay.c @@ -1560,7 +1560,10 @@ static struct command_result *json_xpay_core(struct command *cmd, if (payment->payinfos[i]->cltv_expiry_delta > payment->final_cltv) payment->final_cltv = payment->payinfos[i]->cltv_expiry_delta; } - payment->disable_mpp = false; + /* We will start honoring this flag in future */ + payment->disable_mpp = !feature_offered(b12inv->invoice_features, OPT_BASIC_MPP); + if (payment->disable_mpp && command_deprecated_in_ok(cmd, "ignore_bolt12_mpp", "v25.05", "v25.11")) + payment->disable_mpp = false; } else { struct bolt11 *b11 = bolt11_decode(tmpctx, payment->invstring,