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

Function fallbacks

common/test/run-bolt11.c:263–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263static const u8 **fallbacks(const tal_t *ctx,
264 const struct chainparams *chainparams,
265 const char *addr)
266{
267 jsmntok_t tok;
268 const u8 **addrs = tal_arr(ctx, const u8 *, 1);
269
270 tok.type = JSMN_STRING;
271 tok.start = 0;
272 tok.end = strlen(addr);
273 tok.size = tok.end;
274
275 /* Reuse what we use in json_invoice for fallbacks! */
276 assert(json_to_address_scriptpubkey(ctx,
277 chainparams,
278 addr, &tok,
279 &addrs[0])
280 == ADDRESS_PARSE_SUCCESS);
281 return addrs;
282}
283
284int main(int argc, char *argv[])
285{

Callers 1

mainFunction · 0.85

Calls 1

Tested by

no test coverage detected