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

Function notifications_have_topic

lightningd/notification.c:27–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27bool notifications_have_topic(const struct plugins *plugins, const char *topic)
28{
29 struct plugin *plugin;
30 if (notifications_topic_is_native(topic))
31 return true;
32
33 /* Some plugin at some point announced it'd be emitting
34 * notifications to this topic. */
35 list_for_each(&plugins->plugins, plugin, list) {
36 for (size_t i = 0; i < tal_count(plugin->notification_topics); i++)
37 if (streq(plugin->notification_topics[i], topic))
38 return true;
39 }
40
41 return false;
42}
43
44static void connect_notification_serialize(struct json_stream *stream,
45 const struct node_id *nodeid,

Callers 2

Calls 1

Tested by

no test coverage detected