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

Function check_params

common/json_param.c:245–260  ·  view source on GitHub ↗

* Verify consistent internal state. */

Source from the content-addressed store, hash-verified

243 * Verify consistent internal state.
244 */
245static void check_params(const struct param *params)
246{
247 if (tal_count(params) < 2)
248 return;
249
250 /* make sure there are no required params following optional */
251 check_distinct(params, comp_req_order);
252
253 /* duplicate so we can sort */
254 struct param *copy = tal_dup_talarr(params, struct param, params);
255
256 /* check for repeated names and args */
257 check_unique(copy, comp_by_name);
258
259 tal_free(copy);
260}
261
262static char *param_usage(const tal_t *ctx,
263 const struct param *params)

Callers 2

param_subcommandFunction · 0.85
param_coreFunction · 0.85

Calls 3

check_distinctFunction · 0.85
check_uniqueFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected