| 330 | */ |
| 331 | |
| 332 | u8 *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 | |
| 346 | bool is_anchor_witness_script(const u8 *script, size_t script_len) |
| 347 | { |
no test coverage detected