mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
lightningd: make plugin_kill() free the plugin.
This is what I expected from plugin_kill, and now all the callers do the equivalent anywat, it's easy. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -229,7 +229,7 @@ def test_plugin_command(node_factory):
|
||||
# Make sure the plugin behaves normally after stop and restart
|
||||
assert("Successfully stopped helloworld.py."
|
||||
== n.rpc.plugin_stop(plugin="helloworld.py")["result"])
|
||||
n.daemon.wait_for_log(r"Killing plugin: helloworld.py")
|
||||
n.daemon.wait_for_log(r"Killing plugin: stopped by lightningd via RPC")
|
||||
n.rpc.plugin_start(plugin=os.path.join(os.getcwd(), "contrib/plugins/helloworld.py"))
|
||||
n.daemon.wait_for_log(r"Plugin helloworld.py initialized")
|
||||
assert("Hello world" == n.rpc.call(method="hello"))
|
||||
@@ -237,7 +237,7 @@ def test_plugin_command(node_factory):
|
||||
# Now stop the helloworld plugin
|
||||
assert("Successfully stopped helloworld.py."
|
||||
== n.rpc.plugin_stop(plugin="helloworld.py")["result"])
|
||||
n.daemon.wait_for_log(r"Killing plugin: helloworld.py")
|
||||
n.daemon.wait_for_log(r"Killing plugin: stopped by lightningd via RPC")
|
||||
# Make sure that the 'hello' command from the helloworld.py plugin
|
||||
# is not available anymore.
|
||||
cmd = [hlp for hlp in n.rpc.help()["help"] if "hello" in hlp["command"]]
|
||||
|
||||
Reference in New Issue
Block a user