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

Function codex32_dup

tests/fuzz/fuzz-codex32.c:22–33  ·  view source on GitHub ↗

Duplicate codex32 structure */

Source from the content-addressed store, hash-verified

20
21/* Duplicate codex32 structure */
22static struct codex32 *codex32_dup(const tal_t *ctx, const struct codex32 *src)
23{
24 struct codex32 *dup = tal(ctx, struct codex32);
25 dup->hrp = tal_strdup(dup, src->hrp);
26 dup->threshold = src->threshold;
27 memcpy(dup->id, src->id, sizeof(dup->id));
28 dup->share_idx = src->share_idx;
29 dup->payload = tal_dup_arr(dup, u8, src->payload,
30 tal_bytelen(src->payload), 0);
31 dup->type = src->type;
32 return dup;
33}
34
35void init(int *argc, char ***argv)
36{

Callers 1

Calls 1

tal_bytelenFunction · 0.85

Tested by

no test coverage detected