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

Function param_input_numbers

wallet/walletrpc.c:802–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800}
801
802static struct command_result *param_input_numbers(struct command *cmd,
803 const char *name,
804 const char *buffer,
805 const jsmntok_t *tok,
806 u32 **input_nums)
807{
808 struct command_result *res;
809 const jsmntok_t *arr, *t;
810 size_t i;
811
812 res = param_array(cmd, name, buffer, tok, &arr);
813 if (res)
814 return res;
815
816 *input_nums = tal_arr(cmd, u32, arr->size);
817 json_for_each_arr(i, t, arr) {
818 u32 *num;
819 res = param_number(cmd, name, buffer, t, &num);
820 if (res)
821 return res;
822 (*input_nums)[i] = *num;
823 tal_free(num);
824 }
825 return NULL;
826}
827
828static struct command_result *json_signpsbt(struct command *cmd,
829 const char *buffer,

Callers

nothing calls this directly

Calls 3

param_arrayFunction · 0.85
param_numberFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected