Skip to content

Commit 9c4d1b5

Browse files
committed
xpay: deprecate xpay-handle-pay
Changelog-Deprecated: Config: option `xpay-handle-pay`, `pay` is deprecated and will be replaced by `xpay` in v27.03. Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
1 parent f2b1541 commit 9c4d1b5

5 files changed

Lines changed: 21 additions & 6 deletions

File tree

contrib/msggen/msggen/schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21894,7 +21894,11 @@
2189421894
"value_bool": false,
2189521895
"source": "default",
2189621896
"plugin": "/root/lightning/plugins/cln-xpay",
21897-
"dynamic": true
21897+
"dynamic": true,
21898+
"deprecated": [
21899+
"v26.09",
21900+
"v27.03"
21901+
]
2189821902
},
2189921903
"xpay-slow-mode": {
2190021904
"value_bool": false,

doc/developers-guide/deprecated-features.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ privacy:
3131
| keysend | Command | v26.06 | v27.03 | Replaced by more powerful `xkeysend`. |
3232
| renepay | Command | v26.06 | v27.03 | Use `xpay` instead. |
3333
| renepaystatus | Command | v26.06 | v27.03 | Use `xpay` notifications and `listpays` or `listsendpays` instead. |
34+
| xpay-handle-pay | Config | v26.09 | v27.03 | `pay` is being deprecated and `xpay` for all payments is the default. |
3435

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

doc/schemas/listconfigs.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,11 @@
21912191
"value_bool": false,
21922192
"source": "default",
21932193
"plugin": "/root/lightning/plugins/cln-xpay",
2194-
"dynamic": true
2194+
"dynamic": true,
2195+
"deprecated": [
2196+
"v26.09",
2197+
"v27.03"
2198+
]
21952199
},
21962200
"xpay-slow-mode": {
21972201
"value_bool": false,

plugins/xpay/xpay.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3417,9 +3417,14 @@ int main(int argc, char *argv[])
34173417
notifications, ARRAY_SIZE(notifications),
34183418
hooks, ARRAY_SIZE(hooks),
34193419
outgoing_notifications, ARRAY_SIZE(outgoing_notifications),
3420-
plugin_option_dynamic("xpay-handle-pay", "bool",
3421-
"Make xpay take over pay commands it can handle.",
3422-
bool_option, bool_jsonfmt, &xpay->take_over_pay),
3420+
plugin_option_deprecated_dynamic("xpay-handle-pay",
3421+
"bool",
3422+
"Make xpay take over pay commands it can handle.",
3423+
"v26.09",
3424+
"v27.03",
3425+
bool_option,
3426+
NULL,
3427+
&xpay->take_over_pay),
34233428
plugin_option_dynamic("xpay-slow-mode", "bool",
34243429
"Wait until all parts have completed before returning success or failure",
34253430
bool_option, bool_jsonfmt, &xpay->slow_mode),

tests/test_xpay.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,8 @@ def test_xpay_takeover_null_parms(node_factory, executor):
527527
"""Test passing through RPC a list of parameters some of which have null
528528
json value."""
529529
l1, l2, l3 = node_factory.line_graph(
530-
3, wait_for_announce=True, opts={"xpay-handle-pay": True}
530+
3, wait_for_announce=True, opts={"xpay-handle-pay": True,
531+
"allow-deprecated-apis": True}
531532
)
532533

533534
# Amount argument is null.

0 commit comments

Comments
 (0)