| 7 | #include <common/wire_error.h> |
| 8 | |
| 9 | bool handle_peer_error_or_warning(struct per_peer_state *pps, |
| 10 | const u8 *msg TAKES) |
| 11 | { |
| 12 | const char *err; |
| 13 | |
| 14 | err = is_peer_error(tmpctx, msg); |
| 15 | if (err) |
| 16 | peer_failed_received_errmsg(pps, true, err); |
| 17 | |
| 18 | /* Simply log incoming warnings */ |
| 19 | err = is_peer_warning(tmpctx, msg); |
| 20 | if (err) { |
| 21 | tal_free_if_taken(msg); |
| 22 | status_info("Received %s", err); |
| 23 | return true; |
| 24 | } |
| 25 | |
| 26 | return false; |
| 27 | } |
no test coverage detected