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

Function plugin_stop

lightningd/plugin_control.c:110–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static struct command_result *plugin_stop(struct command *cmd, struct plugin *p,
111 bool kill)
112{
113 struct json_stream *response;
114 const char *stopmsg = tal_fmt(NULL, "Successfully stopped %s.",
115 p->shortname);
116
117 if (kill)
118 plugin_kill(p, LOG_INFORM, "stopped by lightningd via RPC");
119
120 response = json_stream_success(cmd);
121 json_add_string(response, "command", "stop");
122 json_add_string(response, "result", take(stopmsg));
123 return command_success(cmd, response);
124}
125
126/* If plugin stops itself, we end up here. */
127static void plugin_stopped(struct plugin *p, struct command *cmd)

Callers 3

plugin_stoppedFunction · 0.85
plugin_stop_timeoutFunction · 0.85
plugin_dynamic_stopFunction · 0.85

Calls 4

plugin_killFunction · 0.85
json_stream_successFunction · 0.70
command_successFunction · 0.70
json_add_stringFunction · 0.50

Tested by

no test coverage detected