diff --git a/zpay32/invoice.go b/zpay32/invoice.go index 9cfc0a9f9..68b0b41b9 100644 --- a/zpay32/invoice.go +++ b/zpay32/invoice.go @@ -85,11 +85,8 @@ const ( ) var ( - // InvoiceFeatures holds the set of all known feature bits that are - // exposed as BOLT 11 features. - InvoiceFeatures = map[lnwire.FeatureBit]string{} - - // ErrInvoiceTooLarge is returned when an invoice exceeds maxInvoiceLength. + // ErrInvoiceTooLarge is returned when an invoice exceeds + // maxInvoiceLength. ErrInvoiceTooLarge = errors.New("invoice is too large") // ErrInvalidFieldLength is returned when a tagged field was specified @@ -934,7 +931,7 @@ func parseFeatures(data []byte) (*lnwire.FeatureVector, error) { return nil, err } - fv := lnwire.NewFeatureVector(rawFeatures, InvoiceFeatures) + fv := lnwire.NewFeatureVector(rawFeatures, lnwire.Features) unknownFeatures := fv.UnknownRequiredFeatures() if len(unknownFeatures) > 0 { return nil, fmt.Errorf("invoice contains unknown required "+ diff --git a/zpay32/invoice_test.go b/zpay32/invoice_test.go index 5feff241a..abd418d2a 100644 --- a/zpay32/invoice_test.go +++ b/zpay32/invoice_test.go @@ -496,7 +496,7 @@ func TestDecodeEncode(t *testing.T) { Destination: testPubKey, Features: lnwire.NewFeatureVector( lnwire.NewRawFeatureVector(1, 9), - InvoiceFeatures, + lnwire.Features, ), } }, @@ -523,7 +523,7 @@ func TestDecodeEncode(t *testing.T) { Destination: testPubKey, Features: lnwire.NewFeatureVector( lnwire.NewRawFeatureVector(1, 9, 100), - InvoiceFeatures, + lnwire.Features, ), } },