mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
libplugin: fix 'dynamic' field in getmanifest
As a separated commit because it was pre-existent (changelog + xfail test). This also fix a logical problem in lightningd/plugin_control: we were assuming a plugin started with 'plugin start' but which did not comport a 'dynamic' entry in its manifest to be dynamic, though it should have been treated as static. Changelog-fixed: plugins: Dynamic C plugins can now be managed when lightningd is up
This commit is contained in:
@@ -591,8 +591,7 @@ handle_getmanifest(struct command *getmanifest_cmd)
|
||||
json_add_string(params, NULL, p->hook_subs[i].name);
|
||||
json_array_end(params);
|
||||
|
||||
json_add_string(params, "dynamic",
|
||||
p->restartability == PLUGIN_RESTARTABLE ? "true" : "false");
|
||||
json_add_bool(params, "dynamic", p->restartability == PLUGIN_RESTARTABLE);
|
||||
|
||||
return command_finished(getmanifest_cmd, params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user