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

Function anchor_to_remote_redeem

bitcoin/script.c:332–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330 */
331
332u8 *anchor_to_remote_redeem(const tal_t *ctx,
333 const struct pubkey *remote_key,
334 u32 csv_lock)
335{
336 u8 *script = tal_arr(ctx, u8, 0);
337 add_push_key(&script, remote_key);
338 add_op(&script, OP_CHECKSIGVERIFY);
339 add_number(&script, csv_lock);
340 add_op(&script, OP_CHECKSEQUENCEVERIFY);
341
342 assert(is_anchor_witness_script(script, tal_bytelen(script)));
343 return script;
344}
345
346bool is_anchor_witness_script(const u8 *script, size_t script_len)
347{

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
is_anchor_witness_scriptFunction · 0.70

Tested by

no test coverage detected