htlcswitch: add new default case when handling UpdateFailMalformedHLTC

In this commit, we modify the existing logic to handle
UpdateFailMalformedHLTC message from an incoming peer. Rather than fail
the Chanel if they give us an invalid failure code, we’ll instead treat
it as a temporary channel failure so we can continue to forward the
error.
This commit is contained in:
Olaoluwa Osuntokun 2017-12-12 11:42:34 -08:00
parent ecf58d64f7
commit 4cca23264d
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -859,10 +859,8 @@ func (l *channelLink) handleUpstreamMsg(msg lnwire.Message) {
OnionSHA256: msg.ShaOnionBlob,
}
default:
// TODO(roasbeef): fail channel here?
log.Errorf("unable to understand code of received " +
"malformed error")
return
log.Errorf("Unknown failure code: %v", msg.FailureCode)
failure = &lnwire.FailTemporaryChannelFailure{}
}
// With the error parsed, we'll convert the into it's opaque