zpay32: remove unused InvoiceFeatures

Originally the feature namespaces were destined to be split, but this
has changed with the introduction of flat features.
This commit is contained in:
Conner Fromknecht 2019-12-10 13:08:40 -08:00
parent 3c6be62b18
commit a77e111c52
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
2 changed files with 5 additions and 8 deletions

@ -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 "+

@ -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,
),
}
},