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

Function flush_usage_table

plugins/commando.c:71–84  ·  view source on GitHub ↗

Every minute we forget entries. */

Source from the content-addressed store, hash-verified

69
70/* Every minute we forget entries. */
71static void flush_usage_table(void *unused)
72{
73 struct usage *u;
74 struct usage_table_iter it;
75
76 for (u = usage_table_first(&usage_table, &it);
77 u;
78 u = usage_table_next(&usage_table, &it)) {
79 usage_table_delval(&usage_table, &it);
80 tal_free(u);
81 }
82
83 notleak(plugin_timer(plugin, time_from_sec(60), flush_usage_table, NULL));
84}
85
86/* NULL peer: don't care about peer. NULL id: don't care about id */
87static struct commando *find_commando(struct commando **arr,

Callers 1

initFunction · 0.85

Calls 3

tal_freeFunction · 0.85
time_from_secFunction · 0.85
plugin_timerClass · 0.70

Tested by

no test coverage detected