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

Function param_bool

common/json_param.c:416–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416struct command_result *param_bool(struct command *cmd, const char *name,
417 const char *buffer, const jsmntok_t *tok,
418 bool **b)
419{
420 *b = tal(cmd, bool);
421 if (json_to_bool(buffer, tok, *b))
422 return NULL;
423 return command_fail_badparam(cmd, name, buffer, tok,
424 "should be 'true' or 'false'");
425}
426
427struct command_result *param_millionths(struct command *cmd, const char *name,
428 const char *buffer,

Callers

nothing calls this directly

Calls 2

command_fail_badparamFunction · 0.70
json_to_boolFunction · 0.50

Tested by

no test coverage detected