channeldb: complete migration 12 for TLV invoices

This commit is contained in:
Conner Fromknecht committed 2019-11-22 02:24:28 -08:00
1 parent 76682ad820
commit 4c872c438b
10 files changed
+216 -144

No files matched your search

+2 -2
View File
@@ -154,8 +154,6 @@ type Invoice struct {
// LegacyDeserializeInvoice decodes an invoice from the passed io.Reader using
// the pre-TLV serialization.
//
// nolint: dupl
func LegacyDeserializeInvoice(r io.Reader) (Invoice, error) {
var err error
invoice := Invoice{}
@@ -241,6 +239,8 @@ func deserializeHtlcs(r io.Reader) ([]byte, error) {
}
// SerializeInvoice serializes an invoice to a writer.
//
// nolint: dupl
func SerializeInvoice(w io.Writer, i *Invoice) error {
creationDateBytes, err := i.CreationDate.MarshalBinary()
if err != nil {