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

Function rune_restr_from_string

ccan/ccan/rune/coding.c:312–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310}
311
312struct rune_restr *rune_restr_from_string(const tal_t *ctx,
313 const char *str,
314 size_t len)
315{
316 struct rune_restr *restr;
317
318 restr = rune_restr_decode(NULL, &str, &len);
319 /* Don't allow trailing chars */
320 if (restr && len != 0)
321 restr = tal_free(restr);
322 return tal_steal(ctx, restr);
323}
324
325static void to_string(struct wbuf *wbuf, const struct rune *rune, u8 *hash32)
326{

Callers 2

mainFunction · 0.85
rune_restr_from_jsonFunction · 0.85

Calls 2

rune_restr_decodeFunction · 0.85
tal_freeFunction · 0.85

Tested by 1

mainFunction · 0.68