From dde6763cef4d09130146770083370eca0a770546 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Mon, 8 Oct 2018 15:46:14 +0200 Subject: [PATCH] htlcswitch/link: set PermanentFailure in case of remote error --- htlcswitch/link.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 974e3cc1..f43bc3a4 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -1900,9 +1900,14 @@ func (l *channelLink) handleUpstreamMsg(msg lnwire.Message) { // Error received from remote, MUST fail channel, but should // only print the contents of the error message if all // characters are printable ASCII. - l.fail(LinkFailureError{code: ErrRemoteError}, + l.fail( + LinkFailureError{ + code: ErrRemoteError, + PermanentFailure: true, + }, "ChannelPoint(%v): received error from peer: %v", - l.channel.ChannelPoint(), msg.Error()) + l.channel.ChannelPoint(), msg.Error(), + ) default: l.log.Warnf("received unknown message of type %T", msg) }