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

Function param_input_numbers

wallet/walletrpc.c:779–803  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777}
778
779static struct command_result *param_input_numbers(struct command *cmd,
780 const char *name,
781 const char *buffer,
782 const jsmntok_t *tok,
783 u32 **input_nums)
784{
785 struct command_result *res;
786 const jsmntok_t *arr, *t;
787 size_t i;
788
789 res = param_array(cmd, name, buffer, tok, &arr);
790 if (res)
791 return res;
792
793 *input_nums = tal_arr(cmd, u32, arr->size);
794 json_for_each_arr(i, t, arr) {
795 u32 *num;
796 res = param_number(cmd, name, buffer, t, &num);
797 if (res)
798 return res;
799 (*input_nums)[i] = *num;
800 tal_free(num);
801 }
802 return NULL;
803}
804
805static struct command_result *json_signpsbt(struct command *cmd,
806 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