| 180 | } |
| 181 | |
| 182 | static u8 *get_scid_array(const tal_t *ctx, |
| 183 | const char *test_vector, |
| 184 | const jsmntok_t *obj) |
| 185 | { |
| 186 | const jsmntok_t *scids, *arr, *encoding, *t; |
| 187 | size_t i; |
| 188 | u8 *encoded; |
| 189 | |
| 190 | scids = json_get_member(test_vector, obj, "shortChannelIds"); |
| 191 | arr = json_get_member(test_vector, scids, "array"); |
| 192 | |
| 193 | encoded = encoding_start(ctx, true); |
| 194 | encoding = json_get_member(test_vector, scids, "encoding"); |
| 195 | json_for_each_arr(i, t, arr) { |
| 196 | struct short_channel_id scid; |
| 197 | assert(json_to_short_channel_id(test_vector, t, &scid)); |
| 198 | encoding_add_short_channel_id(&encoded, &scid); |
| 199 | } |
| 200 | assert(json_tok_streq(test_vector, encoding, "UNCOMPRESSED")); |
| 201 | |
| 202 | return encoded; |
| 203 | } |
| 204 | |
| 205 | static u8 *test_query_channel_range(const char *test_vector, const jsmntok_t *obj) |
| 206 | { |
no test coverage detected