lightningd: wire plugin command JSON id through to plugin commands.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-09-13 06:49:11 +09:30
parent ea7903f69a
commit eceb9f4328
4 changed files with 15 additions and 11 deletions

View File

@@ -1486,6 +1486,9 @@ def test_libplugin(node_factory):
l1.rpc.plugin_start(plugin)
l1.rpc.check("helloworld")
# Side note: getmanifest will trace back to plugin_start
l1.daemon.wait_for_log(": OUT:id=[0-9]*/cln:getmanifest#[0-9]*")
# Test commands
assert l1.rpc.call("helloworld") == {"hello": "world"}
assert l1.rpc.call("helloworld", {"name": "test"}) == {"hello": "test"}