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

View File

@@ -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.

View File

@@ -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,