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

Function param_sat

common/json_param.c:612–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610}
611
612struct command_result *param_sat(struct command *cmd, const char *name,
613 const char *buffer, const jsmntok_t *tok,
614 struct amount_sat **sat)
615{
616 *sat = tal(cmd, struct amount_sat);
617 if (parse_amount_sat(*sat, buffer + tok->start, tok->end - tok->start))
618 return NULL;
619
620 return command_fail_badparam(cmd, name, buffer, tok,
621 "should be a satoshi amount");
622}
623
624struct command_result *param_sat_or_all(struct command *cmd, const char *name,
625 const char *buffer, const jsmntok_t *tok,

Callers 1

param_sat_or_allFunction · 0.85

Calls 2

parse_amount_satFunction · 0.70
command_fail_badparamFunction · 0.70

Tested by

no test coverage detected