| 279 | } |
| 280 | |
| 281 | static void peer_closing_complete(struct channel *channel, const u8 *msg) |
| 282 | { |
| 283 | if (!fromwire_closingd_complete(msg)) { |
| 284 | channel_internal_error(channel, "Bad closing_complete %s", |
| 285 | tal_hex(msg, msg)); |
| 286 | return; |
| 287 | } |
| 288 | |
| 289 | /* Don't report spurious failure when closingd exits. */ |
| 290 | channel_set_owner(channel, NULL); |
| 291 | /* Clear any transient negotiation messages */ |
| 292 | channel_set_billboard(channel, false, NULL); |
| 293 | |
| 294 | /* Retransmission only, ignore closing. */ |
| 295 | if (channel_closed(channel)) |
| 296 | return; |
| 297 | |
| 298 | /* Channel gets dropped to chain cooperatively. */ |
| 299 | drop_to_chain(channel->peer->ld, channel, true); |
| 300 | channel_set_state(channel, |
| 301 | CLOSINGD_SIGEXCHANGE, |
| 302 | CLOSINGD_COMPLETE, |
| 303 | REASON_UNKNOWN, |
| 304 | "Closing complete"); |
| 305 | } |
| 306 | |
| 307 | static void peer_closing_notify(struct channel *channel, const u8 *msg) |
| 308 | { |
no test coverage detected