|
|
@ -602,6 +602,7 @@ static u8 *test_query_channel_range(const char *test_vector, const jsmntok_t *ob |
|
|
|
} |
|
|
|
msg = towire_query_channel_range(NULL, &chain_hash, firstBlockNum, numberOfBlocks, tlvs); |
|
|
|
|
|
|
|
tal_free(tlvs); |
|
|
|
return msg; |
|
|
|
} |
|
|
|
|
|
|
@ -613,15 +614,17 @@ static u8 *test_reply_channel_range(const char *test_vector, const jsmntok_t *ob |
|
|
|
size_t i; |
|
|
|
u8 *msg; |
|
|
|
u8 *encoded_scids; |
|
|
|
|
|
|
|
u8 *ctx = tal(NULL, u8); |
|
|
|
struct tlv_reply_channel_range_tlvs *tlvs |
|
|
|
= tlv_reply_channel_range_tlvs_new(NULL); |
|
|
|
= tlv_reply_channel_range_tlvs_new(ctx); |
|
|
|
|
|
|
|
get_chainhash(test_vector, obj, &chain_hash); |
|
|
|
assert(json_to_number(test_vector, json_get_member(test_vector, obj, "firstBlockNum"), &firstBlockNum)); |
|
|
|
assert(json_to_number(test_vector, json_get_member(test_vector, obj, "numberOfBlocks"), &numberOfBlocks)); |
|
|
|
assert(json_to_number(test_vector, json_get_member(test_vector, obj, "complete"), &complete)); |
|
|
|
|
|
|
|
encoded_scids = get_scid_array(NULL, test_vector, obj); |
|
|
|
encoded_scids = get_scid_array(ctx, test_vector, obj); |
|
|
|
|
|
|
|
opt = json_get_member(test_vector, obj, "timestamps"); |
|
|
|
if (opt) { |
|
|
@ -686,7 +689,7 @@ static u8 *test_reply_channel_range(const char *test_vector, const jsmntok_t *ob |
|
|
|
msg = towire_reply_channel_range( |
|
|
|
NULL, &chain_hash, firstBlockNum, numberOfBlocks, |
|
|
|
complete, encoded_scids, tlvs); |
|
|
|
tal_free(tlvs); |
|
|
|
tal_free(ctx); |
|
|
|
return msg; |
|
|
|
} |
|
|
|
|
|
|
|