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

Function check_plugins_manifests

lightningd/plugin.c:136–167  ·  view source on GitHub ↗

Once they've all replied with their manifests, we can order them. */

Source from the content-addressed store, hash-verified

134
135/* Once they've all replied with their manifests, we can order them. */
136static void check_plugins_manifests(struct plugins *plugins)
137{
138 struct plugin *plugin;
139 struct plugin **depfail;
140
141 if (plugins_any_in_state(plugins, AWAITING_GETMANIFEST_RESPONSE))
142 return;
143
144 /* Now things are settled, try to order hooks. */
145 depfail = plugin_hooks_make_ordered(tmpctx);
146 for (size_t i = 0; i < tal_count(depfail); i++) {
147 /* Only complain and free plugins! */
148 if (depfail[i]->plugin_state != NEEDS_INIT)
149 continue;
150 plugin_kill(depfail[i], LOG_UNUSUAL,
151 "Cannot meet required hook dependencies");
152 }
153
154 /* Check that all the subscriptions are matched with real
155 * topics. */
156 list_for_each(&plugins->plugins, plugin, list) {
157 plugin_check_subscriptions(plugin->plugins, plugin);
158 }
159
160 /* As startup, we break out once all getmanifest are returned */
161 if (plugins->startup) {
162 log_debug(plugins->ld->log, "io_break: %s", __func__);
163 io_break(plugins);
164 } else
165 /* Otherwise we go straight into configuring them */
166 plugins_config(plugins);
167}
168
169static void check_plugins_initted(struct plugins *plugins)
170{

Callers 2

destroy_pluginFunction · 0.85
plugin_manifest_cbFunction · 0.85

Calls 6

plugins_any_in_stateFunction · 0.85
plugin_killFunction · 0.85
io_breakFunction · 0.85
plugins_configFunction · 0.70

Tested by

no test coverage detected