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

Function plugin_hook_by_name

lightningd/plugin_hook.c:49–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static struct plugin_hook *plugin_hook_by_name(const char *name)
50{
51 size_t num_hooks;
52 struct plugin_hook **hooks = get_hooks(&num_hooks);
53
54 for (size_t i=0; i<num_hooks; i++)
55 if (streq(hooks[i]->name, name))
56 return hooks[i];
57 return NULL;
58}
59
60/* When we destroy a plugin, we NULL out any hooks it registered */
61static void remove_hook_instance(const struct hook_instance *h,

Callers 1

plugin_hook_registerFunction · 0.85

Calls 1

get_hooksFunction · 0.85

Tested by

no test coverage detected