| 3050 | } |
| 3051 | |
| 3052 | static unsigned int dual_opend_msg(struct subd *dualopend, |
| 3053 | const u8 *msg, const int *fds) |
| 3054 | { |
| 3055 | enum dualopend_wire t = fromwire_peektype(msg); |
| 3056 | struct channel *channel = dualopend->channel; |
| 3057 | |
| 3058 | switch (t) { |
| 3059 | case WIRE_DUALOPEND_GOT_OFFER: |
| 3060 | accepter_got_offer(dualopend, dualopend->channel, msg); |
| 3061 | return 0; |
| 3062 | case WIRE_DUALOPEND_GOT_RBF_OFFER: |
| 3063 | rbf_got_offer(dualopend, msg); |
| 3064 | return 0; |
| 3065 | case WIRE_DUALOPEND_PSBT_CHANGED: |
| 3066 | handle_psbt_changed(dualopend, channel, msg); |
| 3067 | return 0; |
| 3068 | case WIRE_DUALOPEND_COMMIT_RCVD: |
| 3069 | handle_commit_received(dualopend, channel, msg); |
| 3070 | return 0; |
| 3071 | case WIRE_DUALOPEND_RBF_VALIDATE: |
| 3072 | handle_validate_rbf(dualopend, msg); |
| 3073 | return 0; |
| 3074 | case WIRE_DUALOPEND_VALIDATE_LEASE: |
| 3075 | handle_validate_lease(dualopend, msg); |
| 3076 | return 0; |
| 3077 | case WIRE_DUALOPEND_FUNDING_SIGS: |
| 3078 | handle_peer_tx_sigs_msg(dualopend, msg); |
| 3079 | return 0; |
| 3080 | case WIRE_DUALOPEND_TX_SIGS_SENT: |
| 3081 | handle_peer_tx_sigs_sent(dualopend, fds, msg); |
| 3082 | return 0; |
| 3083 | case WIRE_DUALOPEND_PEER_LOCKED: |
| 3084 | handle_peer_locked(dualopend, msg); |
| 3085 | return 0; |
| 3086 | case WIRE_DUALOPEND_DRY_RUN: |
| 3087 | handle_dry_run_finished(dualopend, msg); |
| 3088 | return 0; |
| 3089 | case WIRE_DUALOPEND_CHANNEL_LOCKED: |
| 3090 | if (tal_count(fds) != 1) |
| 3091 | return 1; |
| 3092 | handle_channel_locked(dualopend, fds, msg); |
| 3093 | return 0; |
| 3094 | case WIRE_DUALOPEND_GOT_SHUTDOWN: |
| 3095 | handle_peer_wants_to_close(dualopend, msg); |
| 3096 | return 0; |
| 3097 | case WIRE_DUALOPEND_SHUTDOWN_COMPLETE: |
| 3098 | if (tal_count(fds) != 1) |
| 3099 | return 1; |
| 3100 | handle_channel_closed(dualopend, fds, msg); |
| 3101 | return 0; |
| 3102 | case WIRE_DUALOPEND_FAIL_FALLEN_BEHIND: |
| 3103 | channel_fail_fallen_behind(dualopend, msg); |
| 3104 | return 0; |
| 3105 | case WIRE_DUALOPEND_LOCAL_PRIVATE_CHANNEL: |
| 3106 | handle_local_private_channel(dualopend, msg); |
| 3107 | return 0; |
| 3108 | /* Messages we send */ |
| 3109 | case WIRE_DUALOPEND_INIT: |
nothing calls this directly
no test coverage detected