From af1b8a549d7c19f702e9d3b21dfd46bac591e87b Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Sun, 15 Dec 2019 19:48:52 +0100 Subject: [PATCH] channeldb: update payment request comment This field isn't optional. It was introduced in 5ed31b1030176374d4184fee0b80ae7679e0e355 which was part of release 0.4.0. This release contained breaking database changes, so it is safe to assume that from there on the field is always populated. If there would still be empty payment request fields in the wild, users would also experience issues with ListInvoices. ListInvoices decodes the payment request. --- channeldb/invoices.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/channeldb/invoices.go b/channeldb/invoices.go index 2be860a9..bc0f27bc 100644 --- a/channeldb/invoices.go +++ b/channeldb/invoices.go @@ -219,8 +219,7 @@ type Invoice struct { // or any other message which fits within the size constraints. Memo []byte - // PaymentRequest is an optional field where a payment request created - // for this invoice can be stored. + // PaymentRequest is the encoded payment request for this invoice. PaymentRequest []byte // CreationDate is the exact time the invoice was created.