Skip to content

Commit

Permalink
json: add "dynamic" field to plugin list
Browse files Browse the repository at this point in the history
CHANGELOG: add "dynamic" field to plugin list
  • Loading branch information
SimonVrouwe authored and niftynei committed Jul 11, 2022
1 parent 82a1881 commit 71cd07e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/lightning-plugin.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ If **command** is "start", "startdir", "rescan" or "list":
- **plugins** (array of objects):
- **name** (string): full pathname of the plugin
- **active** (boolean): status; plugin completed init and is operational, plugins are configured asynchronously.
- **dynamic** (boolean): plugin can be stopped or started without restarting lightningd

If **command** is "stop":
- **result** (string): A message saying it successfully stopped
Expand All @@ -80,4 +81,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>

[writing plugins]: PLUGINS.md
[comment]: # ( SHA256STAMP:ee9c974be30d7870cb6a7785956548700b95d2d6b3fe4f18f7757afdfa015553)
[comment]: # ( SHA256STAMP:5c3b25ecb137bfe7a81f80f0b4183a9e1282530ebfac3b1bc05fc5406f59cfc7)
7 changes: 6 additions & 1 deletion doc/schemas/plugin.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"additionalProperties": false,
"required": [
"name",
"active"
"active",
"dynamic"
],
"properties": {
"name": {
Expand All @@ -58,6 +59,10 @@
"active": {
"type": "boolean",
"description": "status; plugin completed init and is operational, plugins are configured asynchronously."
},
"dynamic": {
"type": "boolean",
"description": "plugin can be stopped or started without restarting lightningd"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions lightningd/plugin_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ static struct command_result *plugin_dynamic_list_plugins(struct plugin_command
json_add_string(response, "name", p->cmd);
json_add_bool(response, "active",
p->plugin_state == INIT_COMPLETE);
json_add_bool(response, "dynamic", p->dynamic);
json_object_end(response);
}
json_array_end(response);
Expand Down

0 comments on commit 71cd07e

Please sign in to comment.