MCPcopy Create free account
hub / github.com/ElementsProject/lightning / plugin_dynamic_rescan_plugins

Function plugin_dynamic_rescan_plugins

lightningd/plugin_control.c:188–203  ·  view source on GitHub ↗

* Look for additions in the default plugin directory. */

Source from the content-addressed store, hash-verified

186 * Look for additions in the default plugin directory.
187 */
188static struct command_result *
189plugin_dynamic_rescan_plugins(struct plugin_command *pcmd)
190{
191 struct command_result *res;
192
193 /* This will not fail on "already registered" error. */
194 plugins_add_default_dir(pcmd->cmd->ld->plugins);
195
196 /* If none added, this calls plugin_cmd_all_complete immediately */
197 res = plugin_register_all_complete(pcmd->cmd->ld, pcmd);
198 if (res)
199 return res;
200
201 plugins_send_getmanifest(pcmd->cmd->ld->plugins, pcmd->cmd->id);
202 return command_still_pending(pcmd->cmd);
203}
204
205/**
206 * A plugin command which permits to control plugins without restarting

Callers 1

json_plugin_controlFunction · 0.85

Calls 4

plugins_add_default_dirFunction · 0.85
plugins_send_getmanifestFunction · 0.85
command_still_pendingFunction · 0.70

Tested by

no test coverage detected