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

Function json_autoclean_once

plugins/autoclean.c:532–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532static struct command_result *json_autoclean_once(struct command *cmd,
533 const char *buffer,
534 const jsmntok_t *params)
535{
536 enum subsystem *subsystem;
537 u64 *age;
538 struct clean_info *cinfo;
539
540 if (!param(cmd, buffer, params,
541 p_req("subsystem", param_subsystem, &subsystem),
542 p_req("age", param_u64_nonzero, &age),
543 NULL))
544 return command_param_failed();
545
546 cinfo = tal(cmd, struct clean_info);
547 cinfo->cmd = cmd;
548 memset(cinfo->subsystem_age, 0, sizeof(cinfo->subsystem_age));
549 cinfo->subsystem_age[*subsystem] = *age;
550
551 return do_clean(cinfo);
552}
553
554static const char *init(struct plugin *p,
555 const char *buf UNUSED, const jsmntok_t *config UNUSED)

Callers

nothing calls this directly

Calls 3

do_cleanFunction · 0.85
command_param_failedFunction · 0.70
paramFunction · 0.50

Tested by

no test coverage detected