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

Function next_script

common/psbt_internal.c:91–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91static u8 *next_script(const tal_t *ctx, const u8 **cursor, size_t *max)
92{
93 const u8 *p;
94 size_t size;
95 u8 *ret;
96
97 if (!next_size(cursor, max, &size))
98 return NULL;
99
100 if (*max < size) {
101 *max = 0;
102 return NULL;
103 }
104
105 p = *cursor;
106 *max -= size;
107 *cursor += size;
108
109 ret = tal_arr(ctx, u8, size);
110 memcpy(ret, p, size);
111 return ret;
112}
113
114static void
115psbt_input_set_final_witness_stack(const tal_t *ctx,

Callers 1

Calls 1

next_sizeFunction · 0.85

Tested by

no test coverage detected