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

Function json_to_pubkeys

plugins/offers.c:1871–1888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1869}
1870
1871static struct pubkey *json_to_pubkeys(const tal_t *ctx,
1872 const char *buffer,
1873 const jsmntok_t *tok)
1874{
1875 size_t i;
1876 const jsmntok_t *t;
1877 struct pubkey *arr;
1878
1879 if (tok->type != JSMN_ARRAY)
1880 return NULL;
1881
1882 arr = tal_arr(ctx, struct pubkey, tok->size);
1883 json_for_each_arr(i, t, tok) {
1884 if (!json_to_pubkey(buffer, t, &arr[i]))
1885 return tal_free(arr);
1886 }
1887 return arr;
1888}
1889
1890static const char *init(struct command *init_cmd,
1891 const char *buf UNUSED,

Callers

nothing calls this directly

Calls 2

tal_freeFunction · 0.85
json_to_pubkeyFunction · 0.50

Tested by

no test coverage detected