Skip to content

Commit c500a89

Browse files
committed
pay: add missing deprecation annotation
- add missing deprecation annotation to "pay" command, - fix tests that required allow-deprecated-apis=True in order to continue using "pay", - change "pay" to "xpay" in those tests that are NOT testing "pay" directly but just want to make a payment, - and in tests that could be relevant for both "xpay" and "pay", use both. Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
1 parent 472b4af commit c500a89

6 files changed

Lines changed: 335 additions & 157 deletions

File tree

plugins/pay.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,8 @@ static const struct plugin_command commands[] = {
11681168
},
11691169
{
11701170
"pay",
1171-
json_pay
1171+
json_pay,
1172+
"v26.06", "v27.03",
11721173
},
11731174
};
11741175

tests/test_clnrest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,8 @@ def test_numeric_msat_notification(node_factory):
422422
# create rune authorizing listclnrest-notifications method
423423
rune_clnrest_notifications = l2.rpc.createrune(restrictions=[["method=listclnrest-notifications"]])['rune']
424424
http_session.headers.update({"rune": rune_clnrest_notifications})
425-
notifications = notifications_received_via_websocket(l1, base_url, http_session, 'pay', [inv['bolt11']])
425+
notifications = notifications_received_via_websocket(l1, base_url,
426+
http_session, 'xpay', [inv['bolt11']])
426427
filtered_notifications = [n for n in notifications if 'invoice_payment' in n]
427428

428429
assert isinstance(filtered_notifications[0]['invoice_payment']['msat'], int)
@@ -875,7 +876,7 @@ def test_dynamic_path_rune(node_factory):
875876
dynamic_res.json()["message"] == "Not permitted: method is not equal to notpay"
876877
)
877878

878-
rune = l1.rpc.createrune(restrictions=[["method=pay"]])["rune"]
879+
rune = l1.rpc.createrune(restrictions=[["method=xpay"]])["rune"]
879880
dynamic_res = http_session.post(
880881
base_url + "/test/dynamic/clnrest", headers={"Rune": rune}, verify=ca_cert
881882
)

0 commit comments

Comments
 (0)