From ecf58d64f75406b34d9cfec08a81e10665608be6 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 12 Dec 2017 11:22:44 -0800 Subject: [PATCH] peer: properly route UpdateFailMalformedHTLC messages to the switch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds an overlooked case into the main type switch statement within the peer’s readHandler. Before this commit, we would fail to process any UpdateFailMalformedHTLC messages, possibly leading to a commitment desynchronization. To avoid this case, we’ll no properly process the UpdateFailMalformedHTLC message by sending the message to an active link registered to the switch. --- peer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/peer.go b/peer.go index bf0ba538..c296bef7 100644 --- a/peer.go +++ b/peer.go @@ -729,6 +729,9 @@ out: case *lnwire.UpdateFufillHTLC: isChanUpdate = true targetChan = msg.ChanID + case *lnwire.UpdateFailMalformedHTLC: + isChanUpdate = true + targetChan = msg.ChanID case *lnwire.UpdateFailHTLC: isChanUpdate = true targetChan = msg.ChanID