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

Function plugin_dynamic_rescan_plugins

lightningd/plugin_control.c:184–199  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

182 * Look for additions in the default plugin directory.
183 */
184static struct command_result *
185plugin_dynamic_rescan_plugins(struct plugin_command *pcmd)
186{
187 struct command_result *res;
188
189 /* This will not fail on "already registered" error. */
190 plugins_add_default_dir(pcmd->cmd->ld->plugins);
191
192 /* If none added, this calls plugin_cmd_all_complete immediately */
193 res = plugin_register_all_complete(pcmd->cmd->ld, pcmd);
194 if (res)
195 return res;
196
197 plugins_send_getmanifest(pcmd->cmd->ld->plugins, pcmd->cmd->id);
198 return command_still_pending(pcmd->cmd);
199}
200
201/**
202 * 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