| 2257 | } |
| 2258 | |
| 2259 | static u8 *scriptpubkey_to_remote(const tal_t *ctx, |
| 2260 | const struct pubkey *remotekey, |
| 2261 | u32 csv_lock) |
| 2262 | { |
| 2263 | /* BOLT #3: |
| 2264 | * |
| 2265 | * #### `to_remote` Output |
| 2266 | * |
| 2267 | * If `option_anchors` applies to the commitment |
| 2268 | * transaction, the `to_remote` output is encumbered by a one |
| 2269 | * block csv lock. |
| 2270 | * <remotepubkey> OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY |
| 2271 | * |
| 2272 | *... |
| 2273 | * Otherwise, this output is a simple P2WPKH to `remotepubkey`. |
| 2274 | */ |
| 2275 | if (option_anchor_outputs || option_anchors_zero_fee_htlc_tx) { |
| 2276 | return scriptpubkey_p2wsh(ctx, |
| 2277 | bitcoin_wscript_to_remote_anchored(tmpctx, |
| 2278 | remotekey, |
| 2279 | csv_lock)); |
| 2280 | } else { |
| 2281 | return scriptpubkey_p2wpkh(ctx, remotekey); |
| 2282 | } |
| 2283 | } |
| 2284 | |
| 2285 | static void our_unilateral_to_us(struct tracked_output ***outs, |
| 2286 | const struct bitcoin_outpoint *outpoint, |
no test coverage detected