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

Function tell_connectd_custommsgs

lightningd/plugin.c:190–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190static void tell_connectd_custommsgs(struct plugins *plugins)
191{
192 struct plugin *p;
193 u16 *all_msgs = tal_arr(tmpctx, u16, 0);
194
195 /* Not when shutting down */
196 if (!plugins->ld->connectd)
197 return;
198
199 /* Gather from all plugins. */
200 list_for_each(&plugins->plugins, p, list)
201 tal_arr_append(&all_msgs, p->custom_msgs);
202
203 /* Don't bother sorting or uniquifying. If plugins are dumb, they deserve it. */
204 subd_send_msg(plugins->ld->connectd,
205 take(towire_connectd_set_custommsgs(NULL, all_msgs)));
206}
207
208/* Steal req onto reqs. */
209static bool request_add(const char *reqid, struct jsonrpc_request *req,

Callers 2

destroy_pluginFunction · 0.85
plugin_config_cbFunction · 0.85

Calls 1

subd_send_msgFunction · 0.70

Tested by

no test coverage detected