| 1636 | } |
| 1637 | |
| 1638 | static unsigned channel_msg(struct subd *sd, const u8 *msg, const int *fds) |
| 1639 | { |
| 1640 | enum channeld_wire t = fromwire_peektype(msg); |
| 1641 | |
| 1642 | switch (t) { |
| 1643 | case WIRE_CHANNELD_SENDING_COMMITSIG: |
| 1644 | peer_sending_commitsig(sd->channel, msg); |
| 1645 | break; |
| 1646 | case WIRE_CHANNELD_LOCAL_ANCHOR_INFO: |
| 1647 | handle_local_anchors(sd->channel, msg); |
| 1648 | break; |
| 1649 | case WIRE_CHANNELD_GOT_COMMITSIG: |
| 1650 | peer_got_commitsig(sd->channel, msg); |
| 1651 | break; |
| 1652 | case WIRE_CHANNELD_GOT_REVOKE: |
| 1653 | peer_got_revoke(sd->channel, msg); |
| 1654 | break; |
| 1655 | case WIRE_CHANNELD_GOT_CHANNEL_READY: |
| 1656 | peer_got_channel_ready(sd->channel, msg); |
| 1657 | break; |
| 1658 | case WIRE_CHANNELD_GOT_ANNOUNCEMENT: |
| 1659 | peer_got_announcement(sd->channel, msg); |
| 1660 | break; |
| 1661 | case WIRE_CHANNELD_GOT_SHUTDOWN: |
| 1662 | peer_got_shutdown(sd->channel, msg); |
| 1663 | break; |
| 1664 | case WIRE_CHANNELD_REESTABLISHED: |
| 1665 | peer_channeld_reestablished(sd->channel, msg); |
| 1666 | break; |
| 1667 | case WIRE_CHANNELD_SHUTDOWN_COMPLETE: |
| 1668 | /* We expect 1 fd. */ |
| 1669 | if (!fds) |
| 1670 | return 1; |
| 1671 | peer_start_closingd_after_shutdown(sd->channel, msg, fds); |
| 1672 | break; |
| 1673 | case WIRE_CHANNELD_FAIL_FALLEN_BEHIND: |
| 1674 | channel_fail_fallen_behind(sd->channel, msg); |
| 1675 | break; |
| 1676 | case WIRE_CHANNELD_SEND_ERROR_REPLY: |
| 1677 | handle_error_channel(sd->channel, msg); |
| 1678 | break; |
| 1679 | case WIRE_CHANNELD_SPLICE_CONFIRMED_INIT: |
| 1680 | handle_splice_confirmed_init(sd->ld, sd->channel, msg); |
| 1681 | break; |
| 1682 | case WIRE_CHANNELD_SPLICE_FEERATE_ERROR: |
| 1683 | handle_splice_feerate_error(sd->ld, sd->channel, msg); |
| 1684 | break; |
| 1685 | case WIRE_CHANNELD_SPLICE_FUNDING_ERROR: |
| 1686 | handle_splice_funding_error(sd->ld, sd->channel, msg); |
| 1687 | break; |
| 1688 | case WIRE_CHANNELD_SPLICE_ABORT: |
| 1689 | handle_splice_abort(sd->ld, sd->channel, msg); |
| 1690 | break; |
| 1691 | case WIRE_CHANNELD_SPLICE_STATE_ERROR: |
| 1692 | handle_splice_state_error(sd->ld, sd->channel, msg); |
| 1693 | break; |
| 1694 | case WIRE_CHANNELD_SPLICE_CONFIRMED_UPDATE: |
| 1695 | handle_splice_confirmed_update(sd->ld, sd->channel, msg); |
nothing calls this directly
no test coverage detected