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

Function bitcoin_scriptsig_redeem

bitcoin/script.c:229–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229u8 *bitcoin_scriptsig_redeem(const tal_t *ctx,
230 const u8 *redeemscript TAKES)
231{
232 u8 *script;
233
234 /* BIP141: The scriptSig must be exactly a push of the BIP16
235 * redeemScript or validation fails. */
236 script = tal_arr(ctx, u8, 0);
237 script_push_bytes(&script, redeemscript,
238 tal_count(redeemscript));
239
240 if (taken(redeemscript))
241 tal_free(redeemscript);
242
243 return script;
244}
245
246u8 *bitcoin_scriptsig_p2sh_p2wpkh(const tal_t *ctx, const struct pubkey *key)
247{

Callers 2

psbt_finalize_inputFunction · 0.85

Calls 3

takenFunction · 0.85
tal_freeFunction · 0.85
script_push_bytesFunction · 0.70

Tested by

no test coverage detected