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