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

Function rune_to_string

ccan/ccan/rune/coding.c:413–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413char *rune_to_string(const tal_t *ctx, const struct rune *rune)
414{
415 u8 hash32[32];
416 struct wbuf wbuf;
417
418 /* We're going to prepend hash (in hex), plus colon */
419 wbuf.off = sizeof(hash32) * 2 + 1;
420 wbuf.len = 128;
421 wbuf.buf = tal_arr(ctx, char, wbuf.len);
422
423 to_string(&wbuf, rune, hash32);
424 hex_encode(hash32, sizeof(hash32), wbuf.buf, sizeof(hash32) * 2 + 1);
425 wbuf.buf[sizeof(hash32) * 2] = ':';
426 return wbuf.buf;
427}

Callers 6

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
param_decodableFunction · 0.85
json_add_runeFunction · 0.85
mainFunction · 0.85

Calls 2

hex_encodeFunction · 0.85
to_stringFunction · 0.70

Tested by 3

mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68