| 4027 | } |
| 4028 | |
| 4029 | static unsigned int dual_opend_msg(struct subd *dualopend, |
| 4030 | const u8 *msg, const int *fds) |
| 4031 | { |
| 4032 | enum dualopend_wire t = fromwire_peektype(msg); |
| 4033 | struct channel *channel = dualopend->channel; |
| 4034 | |
| 4035 | switch (t) { |
| 4036 | case WIRE_DUALOPEND_GOT_OFFER: |
| 4037 | accepter_got_offer(dualopend, dualopend->channel, msg); |
| 4038 | return 0; |
| 4039 | case WIRE_DUALOPEND_GOT_RBF_OFFER: |
| 4040 | rbf_got_offer(dualopend, msg); |
| 4041 | return 0; |
| 4042 | case WIRE_DUALOPEND_PSBT_CHANGED: |
| 4043 | handle_psbt_changed(dualopend, channel, msg); |
| 4044 | return 0; |
| 4045 | case WIRE_DUALOPEND_COMMIT_READY: |
| 4046 | handle_commit_ready(dualopend, channel, msg); |
| 4047 | return 0; |
| 4048 | case WIRE_DUALOPEND_COMMIT_RCVD: |
| 4049 | handle_commit_received(dualopend, channel, msg); |
| 4050 | return 0; |
| 4051 | case WIRE_DUALOPEND_RBF_VALIDATE: |
| 4052 | handle_validate_rbf(dualopend, msg); |
| 4053 | return 0; |
| 4054 | case WIRE_DUALOPEND_VALIDATE_LEASE: |
| 4055 | handle_validate_lease(dualopend, msg); |
| 4056 | return 0; |
| 4057 | case WIRE_DUALOPEND_FUNDING_SIGS: |
| 4058 | handle_peer_tx_sigs_msg(dualopend, msg); |
| 4059 | return 0; |
| 4060 | case WIRE_DUALOPEND_TX_SIGS_SENT: |
| 4061 | handle_peer_tx_sigs_sent(dualopend, fds, msg); |
| 4062 | return 0; |
| 4063 | case WIRE_DUALOPEND_PEER_LOCKED: |
| 4064 | handle_peer_locked(dualopend, msg); |
| 4065 | return 0; |
| 4066 | case WIRE_DUALOPEND_DRY_RUN: |
| 4067 | handle_dry_run_finished(dualopend, msg); |
| 4068 | return 0; |
| 4069 | case WIRE_DUALOPEND_CHANNEL_LOCKED: |
| 4070 | if (tal_count(fds) != 1) |
| 4071 | return 1; |
| 4072 | handle_channel_locked(dualopend, fds, msg); |
| 4073 | return 0; |
| 4074 | case WIRE_DUALOPEND_GOT_SHUTDOWN: |
| 4075 | handle_peer_wants_to_close(dualopend, msg); |
| 4076 | return 0; |
| 4077 | case WIRE_DUALOPEND_SHUTDOWN_COMPLETE: |
| 4078 | if (tal_count(fds) != 1) |
| 4079 | return 1; |
| 4080 | handle_channel_closed(dualopend, fds, msg); |
| 4081 | return 0; |
| 4082 | case WIRE_DUALOPEND_FAIL_FALLEN_BEHIND: |
| 4083 | channel_fail_fallen_behind(dualopend, msg); |
| 4084 | return 0; |
| 4085 | case WIRE_DUALOPEND_VALIDATE_INPUTS: |
| 4086 | handle_validate_inputs(dualopend, msg); |
nothing calls this directly
no test coverage detected