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

Function param_input_numbers

wallet/walletrpc.c:713–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711}
712
713static struct command_result *param_input_numbers(struct command *cmd,
714 const char *name,
715 const char *buffer,
716 const jsmntok_t *tok,
717 u32 **input_nums)
718{
719 struct command_result *res;
720 const jsmntok_t *arr, *t;
721 size_t i;
722
723 res = param_array(cmd, name, buffer, tok, &arr);
724 if (res)
725 return res;
726
727 *input_nums = tal_arr(cmd, u32, arr->size);
728 json_for_each_arr(i, t, arr) {
729 u32 *num;
730 res = param_number(cmd, name, buffer, t, &num);
731 if (res)
732 return res;
733 (*input_nums)[i] = *num;
734 tal_free(num);
735 }
736 return NULL;
737}
738
739static struct command_result *json_signpsbt(struct command *cmd,
740 const char *buffer,

Callers

nothing calls this directly

Calls 3

tal_freeFunction · 0.85
param_arrayFunction · 0.50
param_numberFunction · 0.50

Tested by

no test coverage detected