From 4373faa81862aa2bf82205b7d8868d0bc7c4deee Mon Sep 17 00:00:00 2001 From: eugene Date: Wed, 23 Mar 2022 12:05:11 -0400 Subject: [PATCH] channeldb: change to ErrTypeForDecodingErr for amp state Was instead returning ErrTypeForEncodingErr. --- channeldb/invoices.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channeldb/invoices.go b/channeldb/invoices.go index eb63d34e0..cbda88d63 100644 --- a/channeldb/invoices.go +++ b/channeldb/invoices.go @@ -2305,7 +2305,9 @@ func ampStateDecoder(r io.Reader, val interface{}, buf *[8]byte, l uint64) error return nil } - return tlv.NewTypeForEncodingErr(val, "channeldb.AMPInvoiceState") + return tlv.NewTypeForDecodingErr( + val, "channeldb.AMPInvoiceState", l, l, + ) } // deserializeHtlcs reads a list of invoice htlcs from a reader and returns it