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

Function json_success_subsystems

plugins/autoclean.c:485–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485static struct command_result *json_success_subsystems(struct command *cmd,
486 const enum subsystem *subsystem)
487{
488 struct json_stream *response = jsonrpc_stream_success(cmd);
489
490 json_object_start(response, "autoclean");
491 for (enum subsystem i = 0; i < NUM_SUBSYSTEM; i++) {
492 if (subsystem && i != *subsystem)
493 continue;
494 json_object_start(response, subsystem_to_str(i));
495 json_add_bool(response, "enabled", timer_cinfo.subsystem_age[i] != 0);
496 if (timer_cinfo.subsystem_age[i] != 0)
497 json_add_u64(response, "age", timer_cinfo.subsystem_age[i]);
498 json_add_u64(response, "cleaned", total_cleaned[i]);
499 json_object_end(response);
500 }
501 json_object_end(response);
502 return command_finished(cmd, response);
503}
504
505static struct command_result *json_autoclean_status(struct command *cmd,
506 const char *buffer,

Callers 1

json_autoclean_statusFunction · 0.85

Calls 7

subsystem_to_strFunction · 0.85
jsonrpc_stream_successFunction · 0.70
command_finishedFunction · 0.70
json_object_startFunction · 0.50
json_add_boolFunction · 0.50
json_add_u64Function · 0.50
json_object_endFunction · 0.50

Tested by

no test coverage detected