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. */
| 86 | * notification topics. Emit a warning if that's not the case, but |
| 87 | * don't kill the plugin. */ |
| 88 | static 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 | |
| 102 | static bool plugins_any_in_state(const struct plugins *plugins, |
| 103 | enum plugin_state state) |
no test coverage detected