Skip to content

Commit 743943a

Browse files
committed
common: downgrade "internal error" errors from lnd.
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]> Changelog-Fixed: Protocol: treat LND "internal error" as warnings, not force close events (as we did in v0.10).
1 parent c55ba9e commit 743943a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

common/peer_failed.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ void peer_failed_received_errmsg(struct per_peer_state *pps,
8484
{
8585
u8 *msg;
8686

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 && streq(desc, "internal error")) {
92+
status_unusual("lnd sent 'internal error':"
93+
" let's give it some space");
94+
warning = true;
95+
}
8796
msg = towire_status_peer_error(NULL, channel_id, desc, warning,
8897
NULL);
8998
peer_billboard(true, "Received %s", desc);

0 commit comments

Comments
 (0)