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

Function bitcoin_witness_htlc_success_tx

bitcoin/script.c:805–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803}
804
805u8 **bitcoin_witness_htlc_success_tx(const tal_t *ctx,
806 const struct bitcoin_signature *localhtlcsig,
807 const struct bitcoin_signature *remotesig,
808 const struct preimage *preimage,
809 const u8 *wscript)
810{
811 u8 **witness = tal_arr(ctx, u8 *, 5);
812
813 witness[0] = stack_number(witness, 0);
814 witness[1] = stack_sig(witness, remotesig);
815 witness[2] = stack_sig(witness, localhtlcsig);
816 witness[3] = stack_preimage(witness, preimage);
817 witness[4] = tal_dup_talarr(witness, u8, wscript);
818
819 return witness;
820}
821u8 *bitcoin_wscript_htlc_tx(const tal_t *ctx,
822 u16 to_self_delay,
823 const struct pubkey *revocation_pubkey,

Callers 3

handle_preimageFunction · 0.85
mainFunction · 0.85

Calls 3

stack_numberFunction · 0.85
stack_sigFunction · 0.85
stack_preimageFunction · 0.85

Tested by

no test coverage detected