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

Function param_recurrence

plugins/offers_offer.c:140–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140static struct command_result *param_recurrence(struct command *cmd,
141 const char *name,
142 const char *buffer,
143 const jsmntok_t *tok,
144 struct recurrence **recurrence)
145{
146 u32 mul;
147 const struct time_string *ts;
148
149 ts = json_to_time(buffer, tok, &mul);
150 if (!ts)
151 return command_fail_badparam(cmd, name, buffer, tok,
152 "not a valid time");
153
154 *recurrence = tal(cmd, struct recurrence);
155 (*recurrence)->time_unit = ts->unit;
156 (*recurrence)->period = ts->mul * mul;
157 return NULL;
158}
159
160static struct command_result *param_recurrence_base(struct command *cmd,
161 const char *name,

Callers

nothing calls this directly

Calls 2

json_to_timeFunction · 0.85
command_fail_badparamFunction · 0.50

Tested by

no test coverage detected