lsp_plugin: change listprotocols request
Using lsp_id instead of peer as identifier Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
e36fdeff81
commit
6c5c302c26
@@ -62,7 +62,7 @@ async fn on_lsps_listprotocols(
|
||||
) -> Result<serde_json::Value, anyhow::Error> {
|
||||
#[derive(Deserialize)]
|
||||
struct Request {
|
||||
peer: String,
|
||||
lsp_id: String,
|
||||
}
|
||||
let dir = p.configuration().lightning_dir;
|
||||
let rpc_path = Path::new(&dir).join(&p.configuration().rpc_file);
|
||||
@@ -71,7 +71,7 @@ async fn on_lsps_listprotocols(
|
||||
|
||||
// Create the transport first and handle potential errors
|
||||
let transport = Bolt8Transport::new(
|
||||
&req.peer,
|
||||
&req.lsp_id,
|
||||
rpc_path,
|
||||
p.state().hook_manager.clone(),
|
||||
None, // Use default timeout
|
||||
|
||||
@@ -27,5 +27,5 @@ def test_lsps0_listprotocols(node_factory):
|
||||
# We don't need a channel to query for lsps services
|
||||
node_factory.join_nodes([l1, l2], fundchannel=False)
|
||||
|
||||
res = l1.rpc.lsps_listprotocols(peer=l2.info['id'])
|
||||
res = l1.rpc.lsps_listprotocols(lsp_id=l2.info['id'])
|
||||
assert res
|
||||
|
||||
Reference in New Issue
Block a user