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

Function bitcoin_wscript_to_remote_anchored

bitcoin/script.c:394–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392 */
393
394u8 *bitcoin_wscript_to_remote_anchored(const tal_t *ctx,
395 const struct pubkey *remote_key,
396 u32 csv_lock)
397{
398 u8 *script = tal_arr(ctx, u8, 0);
399 add_push_key(&script, remote_key);
400 add_op(&script, OP_CHECKSIGVERIFY);
401 add_number(&script, csv_lock);
402 add_op(&script, OP_CHECKSEQUENCEVERIFY);
403
404 assert(is_to_remote_anchored_witness_script(script, tal_bytelen(script)));
405 return script;
406}
407
408bool is_to_remote_anchored_witness_script(const u8 *script, size_t script_len)
409{

Callers 4

scriptpubkey_to_remoteFunction · 0.85
sign_our_inputsFunction · 0.85
commit_txFunction · 0.85
initial_commit_txFunction · 0.85

Calls 5

add_push_keyFunction · 0.85
add_opFunction · 0.85
add_numberFunction · 0.85
tal_bytelenFunction · 0.85

Tested by

no test coverage detected