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

Function next_script

common/psbt_internal.c:35–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35static u8 *next_script(const tal_t *ctx, const u8 **cursor, size_t *max)
36{
37 const u8 *p;
38 size_t size;
39 u8 *ret;
40
41 if (!next_size(cursor, max, &size))
42 return NULL;
43
44 if (*max < size) {
45 *max = 0;
46 return NULL;
47 }
48
49 p = *cursor;
50 *max -= size;
51 *cursor += size;
52
53 ret = tal_arr(ctx, u8, size);
54 memcpy(ret, p, size);
55 return ret;
56}
57
58static void
59psbt_input_set_final_witness_stack(const tal_t *ctx,

Callers 1

Calls 1

next_sizeFunction · 0.85

Tested by

no test coverage detected