Handle random messages we might get, returning the first non-handled one. */
| 116 | |
| 117 | /* Handle random messages we might get, returning the first non-handled one. */ |
| 118 | static u8 *closing_read_peer_msg(const tal_t *ctx, |
| 119 | struct per_peer_state *pps, |
| 120 | const struct channel_id *channel_id) |
| 121 | { |
| 122 | for (;;) { |
| 123 | u8 *msg; |
| 124 | |
| 125 | clean_tmpctx(); |
| 126 | msg = peer_read(ctx, pps); |
| 127 | if (!handle_peer_error(pps, channel_id, msg)) |
| 128 | return msg; |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | static void send_offer(struct per_peer_state *pps, |
| 133 | const struct chainparams *chainparams, |
no test coverage detected