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

Function cycle_seconds_option

plugins/autoclean.c:829–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

827}
828
829static char *cycle_seconds_option(struct command *cmd, const char *arg,
830 bool check_only,
831 u64 *cycle_seconds)
832{
833 char *problem = u64_option(cmd, arg, check_only, cycle_seconds);
834 if (problem || check_only)
835 return problem;
836
837 /* If timer is not running right now, reset it to new cycle_seconds */
838 if (cleantimer) {
839 tal_free(cleantimer);
840 cleantimer = global_timer(cmd->plugin,
841 time_from_sec(*cycle_seconds),
842 do_clean_timer, NULL);
843 }
844 return NULL;
845}
846
847static bool u64_jsonfmt_unless_zero(struct command *cmd,
848 struct json_stream *js, const char *fieldname, u64 *i)

Callers

nothing calls this directly

Calls 3

u64_optionFunction · 0.85
tal_freeFunction · 0.85
time_from_secFunction · 0.85

Tested by

no test coverage detected