peer: properly route UpdateFailMalformedHTLC messages to the switch

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.
This commit is contained in:
Olaoluwa Osuntokun 2017-12-12 11:22:44 -08:00
parent ef520f49c3
commit ecf58d64f7
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -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