multi: allow invalid tlv data when decoding payment fail info
Older payments might have a invalid tlv stream, we now catch this case and add a unit test.
This commit is contained in:
5 files changed
+139
-3
No files matched your search
@@ -169,7 +169,7 @@ func (a *ChannelUpdate1) Decode(r io.Reader, _ uint32) error {
|
||||
var inboundFee = a.InboundFee.Zero()
|
||||
typeMap, err := tlvRecords.ExtractRecords(&inboundFee)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("%w: %w", ErrParsingExtraTLVBytes, err)
|
||||
}
|
||||
|
||||
val, ok := typeMap[a.InboundFee.TlvType()]
|
||||
|
||||
Reference in new issue
Block a user