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

Function plugin_hook_by_name

lightningd/plugin_hook.c:52–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52static struct plugin_hook *plugin_hook_by_name(const char *name)
53{
54 size_t num_hooks;
55 struct plugin_hook **hooks = get_hooks(&num_hooks);
56
57 for (size_t i=0; i<num_hooks; i++)
58 if (streq(hooks[i]->name, name))
59 return hooks[i];
60 return NULL;
61}
62
63/* When we destroy a plugin, we remove its hooks */
64static void destroy_hook_instance(struct hook_instance *h,

Callers 1

plugin_hook_registerFunction · 0.85

Calls 1

get_hooksFunction · 0.85

Tested by

no test coverage detected