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

Function param_bool

common/json_param.c:391–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391struct command_result *param_bool(struct command *cmd, const char *name,
392 const char *buffer, const jsmntok_t *tok,
393 bool **b)
394{
395 *b = tal(cmd, bool);
396 if (json_to_bool(buffer, tok, *b))
397 return NULL;
398 return command_fail_badparam(cmd, name, buffer, tok,
399 "should be 'true' or 'false'");
400}
401
402struct command_result *param_millionths(struct command *cmd, const char *name,
403 const char *buffer,

Callers

nothing calls this directly

Calls 2

command_fail_badparamFunction · 0.85
json_to_boolFunction · 0.70

Tested by

no test coverage detected