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

Function plugin_check_subscriptions

lightningd/plugin.c:98–109  ·  view source on GitHub ↗

Check that all the plugin's subscriptions are actually for known * notification topics. Emit a warning if that's not the case, but * don't kill the plugin. */

Source from the content-addressed store, hash-verified

96 * notification topics. Emit a warning if that's not the case, but
97 * don't kill the plugin. */
98static void plugin_check_subscriptions(struct plugins *plugins,
99 struct plugin *plugin)
100{
101 for (size_t i = 0; i < tal_count(plugin->subscriptions); i++) {
102 const char *topic = plugin->subscriptions[i];
103 if (!notifications_have_topic(plugins, topic))
104 log_unusual(
105 plugin->log,
106 "topic '%s' is not a known notification topic",
107 topic);
108 }
109}
110
111static bool plugins_any_in_state(const struct plugins *plugins,
112 enum plugin_state state)

Callers 1

check_plugins_manifestsFunction · 0.85

Calls 1

notifications_have_topicFunction · 0.85

Tested by

no test coverage detected