| 2110 | } |
| 2111 | |
| 2112 | static u8 *scriptpubkey_to_remote(const tal_t *ctx, |
| 2113 | const struct pubkey *remotekey, |
| 2114 | u32 csv_lock) |
| 2115 | { |
| 2116 | /* BOLT #3: |
| 2117 | * |
| 2118 | * #### `to_remote` Output |
| 2119 | * |
| 2120 | * If `option_anchors` applies to the commitment |
| 2121 | * transaction, the `to_remote` output is encumbered by a one |
| 2122 | * block csv lock. |
| 2123 | * <remotepubkey> OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY |
| 2124 | * |
| 2125 | *... |
| 2126 | * Otherwise, this output is a simple P2WPKH to `remotepubkey`. |
| 2127 | */ |
| 2128 | if (option_anchor_outputs || option_anchors_zero_fee_htlc_tx) { |
| 2129 | return scriptpubkey_p2wsh(ctx, |
| 2130 | bitcoin_wscript_to_remote_anchored(tmpctx, |
| 2131 | remotekey, |
| 2132 | csv_lock)); |
| 2133 | } else { |
| 2134 | return scriptpubkey_p2wpkh(ctx, remotekey); |
| 2135 | } |
| 2136 | } |
| 2137 | |
| 2138 | static void our_unilateral_to_us(struct tracked_output ***outs, |
| 2139 | const struct bitcoin_outpoint *outpoint, |
no test coverage detected