plugin: change method name of lsps-jitchannel
What changed, and why it matters
This commit simply renames a plugin command from 'lsps-jitchannel' to 'lsps-lsps2-invoice' and updates the matching test calls. It is a routine naming consistency fix with no security relevance.
No security action needed; treat as a normal refactoring/rename commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff changes the registered RPC method name in plugins/lsps-plugin/src/client.rs from ‘lsps-jitchannel’ to ‘lsps-lsps2-invoice’ and renames the handler function accordingly. The Python tests are updated to call the new RPC method name. No logic, parsing, authorization, or cryptographic code is modified.
Changed components
plugins/lsps-plugin/src/client.rstests/test_cln_lsps.pyInspect captured patch +5 / −5
diff --git a/plugins/lsps-plugin/src/client.rs b/plugins/lsps-plugin/src/client.rs
index 0ca25e33..a466560f 100644
--- a/plugins/lsps-plugin/src/client.rs
+++ b/plugins/lsps-plugin/src/client.rs
@@ -78,9 +78,9 @@ async fn main() -> Result<(), anyhow::Error> {
on_lsps_lsps2_approve,
)
.rpcmethod(
- "lsps-jitchannel",
+ "lsps-lsps2-invoice",
"Requests a new jit channel from LSP and returns the matching invoice",
- on_lsps_jitchannel,
+ on_lsps_lsps2_invoice,
)
.hook("invoice_payment", on_invoice_payment)
.hook("htlc_accepted", on_htlc_accepted)
@@ -285,7 +285,7 @@ async fn on_lsps_lsps2_approve(
/// RPC Method handler for `lsps-jitchannel`.
/// Calls lsps2.get_info, selects parameters, calculates fee, calls lsps2.buy,
/// creates invoice.
-async fn on_lsps_jitchannel(
+async fn on_lsps_lsps2_invoice(
p: cln_plugin::Plugin<State>,
v: serde_json::Value,
) -> Result<serde_json::Value, anyhow::Error> {
diff --git a/tests/test_cln_lsps.py b/tests/test_cln_lsps.py
index e2ce15b0..7eb2d4ff 100644
--- a/tests/test_cln_lsps.py
+++ b/tests/test_cln_lsps.py
@@ -149,7 +149,7 @@ def test_lsps2_buyjitchannel_no_mpp_var_invoice(node_factory, bitcoind):
"short_channel_id"
]
- inv = l1.rpc.lsps_jitchannel(
+ inv = l1.rpc.lsps_lsps2_invoice(
lsp_id=l2.info["id"],
amount_msat="any",
description="lsp-jit-channel-0",
@@ -239,7 +239,7 @@ def test_lsps2_buyjitchannel_mpp_fixed_invoice(node_factory, bitcoind):
]
amt = 10_000_000
- inv = l1.rpc.lsps_jitchannel(
+ inv = l1.rpc.lsps_lsps2_invoice(
lsp_id=l2.info["id"],
amount_msat=f"{amt}msat",
description="lsp-jit-channel-0",
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.