Skip to content

Commit

Permalink
common: downgrade "internal error" errors from lnd.
Browse files Browse the repository at this point in the history
Prior to 0.11.0 we had cases where we would treat errors
as warnings: regretfully, this is still needed.  This message
in particular has been widely reported, and it now causes
channel force closes.

Downgrade and log.  I did insert some snarky log message earlier,
but hey, I'm sure CLN has done worse things to our peers!

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jun 20, 2022
1 parent cff8593 commit 484a01b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions common/peer_failed.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ void peer_failed_received_errmsg(struct per_peer_state *pps,
{
u8 *msg;

/* LND sends "internal error" and we close the channel. But
* prior to 0.11 we would turn this into a warning, and they
* would recover after a reconnect. So we downgrade, but snark
* about it in the logs. */
if (!warning && streq(desc, "internal error")) {
status_unusual("lnd sent 'internal error':"
" let's give it some space");
warning = true;
}
msg = towire_status_peer_error(NULL, channel_id, desc, warning,
NULL);
peer_billboard(true, "Received %s", desc);
Expand Down

0 comments on commit 484a01b

Please sign in to comment.