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