| 327 | } |
| 328 | |
| 329 | static unsigned closing_msg(struct subd *sd, const u8 *msg, const int *fds UNUSED) |
| 330 | { |
| 331 | enum closingd_wire t = fromwire_peektype(msg); |
| 332 | |
| 333 | switch (t) { |
| 334 | case WIRE_CLOSINGD_RECEIVED_SIGNATURE: |
| 335 | peer_received_closing_signature(sd->channel, msg); |
| 336 | break; |
| 337 | |
| 338 | case WIRE_CLOSINGD_COMPLETE: |
| 339 | peer_closing_complete(sd->channel, msg); |
| 340 | break; |
| 341 | |
| 342 | case WIRE_CLOSINGD_NOTIFICATION: |
| 343 | peer_closing_notify(sd->channel, msg); |
| 344 | break; |
| 345 | |
| 346 | /* We send these, not receive them */ |
| 347 | case WIRE_CLOSINGD_INIT: |
| 348 | case WIRE_CLOSINGD_RECEIVED_SIGNATURE_REPLY: |
| 349 | break; |
| 350 | } |
| 351 | |
| 352 | return 0; |
| 353 | } |
| 354 | |
| 355 | void peer_start_closingd(struct channel *channel, struct peer_fd *peer_fd) |
| 356 | { |
nothing calls this directly
no test coverage detected