We're failing because peer sent us an error/warning message */
| 78 | |
| 79 | /* We're failing because peer sent us an error/warning message */ |
| 80 | void peer_failed_received_errmsg(struct per_peer_state *pps, |
| 81 | const char *desc, |
| 82 | const struct channel_id *channel_id, |
| 83 | bool warning) |
| 84 | { |
| 85 | u8 *msg; |
| 86 | |
| 87 | /* LND sends "internal error" and we close the channel. But |
| 88 | * prior to 0.11 we would turn this into a warning, and they |
| 89 | * would recover after a reconnect. So we downgrade, but snark |
| 90 | * about it in the logs. */ |
| 91 | if (!warning && strends(desc, "internal error")) { |
| 92 | status_unusual("lnd sent 'internal error':" |
| 93 | " let's give it some space"); |
| 94 | warning = true; |
| 95 | } |
| 96 | msg = towire_status_peer_error(NULL, channel_id, desc, warning, |
| 97 | NULL); |
| 98 | peer_billboard(true, "Received %s", desc); |
| 99 | peer_fatal_continue(take(msg), pps); |
| 100 | } |
| 101 | |
| 102 | void peer_failed_connection_lost(void) |
| 103 | { |
no test coverage detected