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

Function remove_hook_instance

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

When we destroy a plugin, we NULL out any hooks it registered */

Source from the content-addressed store, hash-verified

59
60/* When we destroy a plugin, we NULL out any hooks it registered */
61static void remove_hook_instance(const struct hook_instance *h,
62 struct hook_instance **hookarr)
63{
64 for (size_t i = 0; i < tal_count(hookarr); i++) {
65 if (h == hookarr[i]) {
66 hookarr[i] = NULL;
67 return;
68 }
69 }
70 abort();
71}
72
73static void destroy_hook_instance(struct hook_instance *h,
74 struct plugin_hook *hook)

Callers 1

destroy_hook_instanceFunction · 0.85

Calls 1

abortFunction · 0.85

Tested by

no test coverage detected