| 2245 | } |
| 2246 | |
| 2247 | static void handle_mutual_close(struct tracked_output **outs, |
| 2248 | const struct tx_parts *tx) |
| 2249 | { |
| 2250 | /* In this case, we don't care about htlcs: there are none. */ |
| 2251 | init_reply(tmpctx, "Tracking mutual close transaction"); |
| 2252 | |
| 2253 | /* Annotate the first input as close. We can currently only have a |
| 2254 | * single input for these. */ |
| 2255 | onchain_annotate_txin(&tx->txid, 0, TX_CHANNEL_CLOSE); |
| 2256 | |
| 2257 | /* BOLT #5: |
| 2258 | * |
| 2259 | * A closing transaction *resolves* the funding transaction output. |
| 2260 | * |
| 2261 | * In the case of a mutual close, a node need not do anything else, as it has |
| 2262 | * already agreed to the output, which is sent to its specified `scriptpubkey` |
| 2263 | */ |
| 2264 | resolved_by_other(outs[0], &tx->txid, MUTUAL_CLOSE); |
| 2265 | wait_for_resolved(outs); |
| 2266 | } |
| 2267 | |
| 2268 | static u8 **derive_htlc_scripts(const struct htlc_stub *htlcs, enum side side) |
| 2269 | { |
no test coverage detected