| 1869 | } |
| 1870 | |
| 1871 | static 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 | |
| 1890 | static const char *init(struct command *init_cmd, |
| 1891 | const char *buf UNUSED, |
nothing calls this directly
no test coverage detected