MCPcopy Create free account
hub / github.com/ElementsProject/lightning / get_scid_array

Function get_scid_array

gossipd/test/run-extended-info.c:182–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182static 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
205static u8 *test_query_channel_range(const char *test_vector, const jsmntok_t *obj)
206{

Callers 2

test_reply_channel_rangeFunction · 0.85

Calls 5

encoding_startFunction · 0.85
json_get_memberFunction · 0.50
json_to_short_channel_idFunction · 0.50
json_tok_streqFunction · 0.50

Tested by

no test coverage detected