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

Function to_wbuf

ccan/ccan/rune/coding.c:64–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62};
63
64static void to_wbuf(const char *s, size_t len, void *vwbuf)
65{
66 struct wbuf *wbuf = vwbuf;
67
68 while (wbuf->off + len > wbuf->len)
69 tal_resize(&wbuf->buf, wbuf->len *= 2);
70 memcpy(wbuf->buf + wbuf->off, s, len);
71 wbuf->off += len;
72}
73
74/* For adding to sha256 */
75static void to_sha256(const char *s, size_t len, void *vshactx)

Callers 1

to_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected