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

Function plugin_check_subscriptions

lightningd/plugin.c:88–100  ·  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

86 * notification topics. Emit a warning if that's not the case, but
87 * don't kill the plugin. */
88static void plugin_check_subscriptions(struct plugins *plugins,
89 struct plugin *plugin)
90{
91 for (size_t i = 0; i < tal_count(plugin->subscriptions); i++) {
92 struct plugin_subscription *sub = &plugin->subscriptions[i];
93 if (!streq(sub->topic, "*")
94 && !notifications_have_topic(plugins, sub->topic))
95 log_unusual(
96 plugin->log,
97 "topic '%s' is not a known notification topic",
98 sub->topic);
99 }
100}
101
102static bool plugins_any_in_state(const struct plugins *plugins,
103 enum plugin_state state)

Callers 1

check_plugins_manifestsFunction · 0.85

Calls 1

notifications_have_topicFunction · 0.85

Tested by

no test coverage detected