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

Function plugin_stop

lightningd/plugin_control.c:112–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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