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

Function param_number

common/json_param.c:462–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462struct command_result *param_number(struct command *cmd, const char *name,
463 const char *buffer, const jsmntok_t *tok,
464 unsigned int **num)
465{
466 *num = tal(cmd, unsigned int);
467 if (json_to_number(buffer, tok, *num))
468 return NULL;
469
470 return command_fail_badparam(cmd, name, buffer, tok,
471 "should be an integer");
472}
473
474struct command_result *param_sha256(struct command *cmd, const char *name,
475 const char *buffer, const jsmntok_t *tok,

Callers 1

param_positive_numberFunction · 0.50

Calls 2

command_fail_badparamFunction · 0.85
json_to_numberFunction · 0.70

Tested by

no test coverage detected