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

Function new_clean_info

plugins/autoclean.c:235–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233static struct command_result *do_clean(struct clean_info *cinfo);
234
235static struct clean_info *new_clean_info(const tal_t *ctx,
236 struct command *cmd)
237{
238 struct clean_info *cinfo = tal(ctx, struct clean_info);
239 cinfo->cmd = cmd;
240 cinfo->cleanup_reqs_remaining = 0;
241
242 for (enum subsystem_type i = 0; i < NUM_SUBSYSTEM_TYPES; i++) {
243 struct per_subsystem *ps = &cinfo->per_subsystem[i];
244 ps->cinfo = cinfo;
245 ps->type = i;
246
247 for (enum subsystem_variant j = 0; j < NUM_SUBSYSTEM_VARIANTS; j++) {
248 struct per_variant *pv = &ps->variants[j];
249 pv->per_subsystem = ps;
250 pv->variant = j;
251
252 pv->age = 0;
253 }
254 }
255 return cinfo;
256}
257
258static u64 *total_cleaned(const struct subsystem_and_variant *sv)
259{

Callers 2

json_autoclean_onceFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected