lnwire: if unable to parse encapsulated error, log length and raw bytes
In this commit, we add additional detail in the error return hen were’e unable to properly decode an encapsulated error. This additional logging was added with the goal of being able to track down a lingering bug, where at times lnd cannot decode a TemporaryChannelFailure message.
This commit is contained in:
parent
d6172ca8b4
commit
7e54b4ae46
@ -532,6 +532,7 @@ func (f *FailTemporaryChannelFailure) Decode(r io.Reader, pver uint32) error {
|
||||
f.Update = &ChannelUpdate{}
|
||||
return f.Update.Decode(r, pver)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1031,7 +1032,8 @@ func DecodeFailure(r io.Reader, pver uint32) (FailureMessage, error) {
|
||||
case Serializable:
|
||||
if err := f.Decode(dataReader, pver); err != nil {
|
||||
return nil, fmt.Errorf("unable to decode error "+
|
||||
"update (%T): %v", err, failure)
|
||||
"update (type=%T, len_bytes=%v, bytes=%x): %v",
|
||||
failure, failureLength, failureData[:], err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user