| 2087 | } |
| 2088 | |
| 2089 | static u8 *scriptpubkey_to_remote(const tal_t *ctx, |
| 2090 | const struct pubkey *remotekey, |
| 2091 | u32 csv_lock) |
| 2092 | { |
| 2093 | /* BOLT #3: |
| 2094 | * |
| 2095 | * #### `to_remote` Output |
| 2096 | * |
| 2097 | * If `option_anchors` applies to the commitment |
| 2098 | * transaction, the `to_remote` output is encumbered by a one |
| 2099 | * block csv lock. |
| 2100 | * <remotepubkey> OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY |
| 2101 | * |
| 2102 | *... |
| 2103 | * Otherwise, this output is a simple P2WPKH to `remotepubkey`. |
| 2104 | */ |
| 2105 | if (option_anchor_outputs || option_anchors_zero_fee_htlc_tx) { |
| 2106 | return scriptpubkey_p2wsh(ctx, |
| 2107 | bitcoin_wscript_to_remote_anchored(tmpctx, |
| 2108 | remotekey, |
| 2109 | csv_lock)); |
| 2110 | } else { |
| 2111 | return scriptpubkey_p2wpkh(ctx, remotekey); |
| 2112 | } |
| 2113 | } |
| 2114 | |
| 2115 | static void our_unilateral_to_us(struct tracked_output ***outs, |
| 2116 | const struct bitcoin_outpoint *outpoint, |
no test coverage detected