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

Function param_recurrence

plugins/offers_offer.c:150–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150static struct command_result *param_recurrence(struct command *cmd,
151 const char *name,
152 const char *buffer,
153 const jsmntok_t *tok,
154 struct tlv_offer_recurrence
155 **recurrence)
156{
157 u32 mul;
158 const struct time_string *ts;
159
160 ts = json_to_time(buffer, tok, &mul);
161 if (!ts)
162 return command_fail_badparam(cmd, name, buffer, tok,
163 "not a valid time");
164
165 *recurrence = tal(cmd, struct tlv_offer_recurrence);
166 (*recurrence)->time_unit = ts->unit;
167 (*recurrence)->period = ts->mul * mul;
168 return NULL;
169}
170
171static struct command_result *param_recurrence_base(struct command *cmd,
172 const char *name,

Callers

nothing calls this directly

Calls 2

json_to_timeFunction · 0.85
command_fail_badparamFunction · 0.85

Tested by

no test coverage detected