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

Function witness_stack_elements

common/psbt_internal.c:75–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75const struct witness_element *witness_stack_elements(const tal_t *ctx,
76 const u8 *witness)
77{
78 size_t n;
79 struct witness_element *elements;
80
81 if (!parse_witness_stack(witness, &n, NULL))
82 return NULL;
83
84 /* Each item costs at least its length byte, so n fits the blob. */
85 elements = tal_arr(ctx, struct witness_element, n);
86 if (!parse_witness_stack(witness, &n, elements))
87 return tal_free(elements);
88 return elements;
89}
90
91static u8 *next_script(const tal_t *ctx, const u8 **cursor, size_t *max)
92{

Callers 1

Calls 2

parse_witness_stackFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected