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

Function bitcoin_witness_sig_and_element

bitcoin/script.c:490–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

488}
489
490u8 **bitcoin_witness_sig_and_element(const tal_t *ctx,
491 const struct bitcoin_signature *sig,
492 const void *elem, size_t elemsize,
493 const u8 *witnessscript)
494{
495 u8 **witness = tal_arr(ctx, u8 *, 3);
496
497 witness[0] = stack_sig(witness, sig);
498 witness[1] = tal_dup_arr(witness, u8, elem, elemsize, 0);
499 witness[2] = tal_dup_talarr(witness, u8, witnessscript);
500
501 return witness;
502}
503
504/* BOLT #3:
505 *

Callers 3

tx_to_usFunction · 0.85
replace_penalty_tx_to_usFunction · 0.85
penalty_tx_createFunction · 0.85

Calls 1

stack_sigFunction · 0.85

Tested by

no test coverage detected