| 304 | } |
| 305 | |
| 306 | static struct tlv_query_short_channel_ids_tlvs_query_flags * |
| 307 | get_query_flags_array(const tal_t *ctx, |
| 308 | const char *test_vector, |
| 309 | const jsmntok_t *opt) |
| 310 | { |
| 311 | const jsmntok_t *encoding, *arr, *t; |
| 312 | struct tlv_query_short_channel_ids_tlvs_query_flags *tlv |
| 313 | = tal(ctx, struct tlv_query_short_channel_ids_tlvs_query_flags); |
| 314 | size_t i; |
| 315 | |
| 316 | arr = json_get_member(test_vector, opt, "array"); |
| 317 | |
| 318 | tlv->encoded_query_flags = encoding_start(tlv, false); |
| 319 | encoding = json_get_member(test_vector, opt, "encoding"); |
| 320 | json_for_each_arr(i, t, arr) { |
| 321 | bigsize_t f; |
| 322 | assert(json_to_u64(test_vector, t, &f)); |
| 323 | encoding_add_query_flag(&tlv->encoded_query_flags, f); |
| 324 | } |
| 325 | assert(json_tok_streq(test_vector, encoding, "UNCOMPRESSED")); |
| 326 | tlv->encoding_type = ARR_UNCOMPRESSED; |
| 327 | |
| 328 | return tlv; |
| 329 | } |
| 330 | |
| 331 | static u8 *test_query_short_channel_ids(const char *test_vector, |
| 332 | const jsmntok_t *obj) |
no test coverage detected