cln-plugin: Add support for synchronous RPC methods

Changelog-Experimental: cln-plugin: Added support for non-async RPC method passthrough (async support coming soon)
This commit is contained in:
Christian Decker
2022-02-21 18:31:29 +01:00
committed by Rusty Russell
parent 22618a2f94
commit 8c6af21169
5 changed files with 184 additions and 55 deletions

View File

@@ -37,3 +37,18 @@ def test_plugin_start(node_factory):
'path': None
}
assert expected == p
# Now check that the `testmethod was registered ok
l1.rpc.help("testmethod") == {
'help': [
{
'command': 'testmethod ',
'category': 'plugin',
'description': 'This is a test',
'verbose': 'This is a test'
}
],
'format-hint': 'simple'
}
assert l1.rpc.testmethod() == "Hello"