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

Function notifications_have_topic

lightningd/notification.c:22–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22bool notifications_have_topic(const struct plugins *plugins, const char *topic)
23{
24 struct plugin *plugin;
25 if (notifications_topic_is_native(topic))
26 return true;
27
28 /* Some plugin at some point announced it'd be emitting
29 * notifications to this topic. */
30 list_for_each(&plugins->plugins, plugin, list) {
31 for (size_t i = 0; i < tal_count(plugin->notification_topics); i++)
32 if (streq(plugin->notification_topics[i], topic))
33 return true;
34 }
35
36 return false;
37}
38
39/* Modern notifications X contain an object X */
40static struct jsonrpc_notification *notify_start(struct lightningd *ld,

Callers 2

Calls 1

Tested by

no test coverage detected