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:
parent
3c6be62b18
commit
a77e111c52
@ -85,11 +85,8 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// InvoiceFeatures holds the set of all known feature bits that are
|
// ErrInvoiceTooLarge is returned when an invoice exceeds
|
||||||
// exposed as BOLT 11 features.
|
// maxInvoiceLength.
|
||||||
InvoiceFeatures = map[lnwire.FeatureBit]string{}
|
|
||||||
|
|
||||||
// ErrInvoiceTooLarge is returned when an invoice exceeds maxInvoiceLength.
|
|
||||||
ErrInvoiceTooLarge = errors.New("invoice is too large")
|
ErrInvoiceTooLarge = errors.New("invoice is too large")
|
||||||
|
|
||||||
// ErrInvalidFieldLength is returned when a tagged field was specified
|
// ErrInvalidFieldLength is returned when a tagged field was specified
|
||||||
@ -934,7 +931,7 @@ func parseFeatures(data []byte) (*lnwire.FeatureVector, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
fv := lnwire.NewFeatureVector(rawFeatures, InvoiceFeatures)
|
fv := lnwire.NewFeatureVector(rawFeatures, lnwire.Features)
|
||||||
unknownFeatures := fv.UnknownRequiredFeatures()
|
unknownFeatures := fv.UnknownRequiredFeatures()
|
||||||
if len(unknownFeatures) > 0 {
|
if len(unknownFeatures) > 0 {
|
||||||
return nil, fmt.Errorf("invoice contains unknown required "+
|
return nil, fmt.Errorf("invoice contains unknown required "+
|
||||||
|
@ -496,7 +496,7 @@ func TestDecodeEncode(t *testing.T) {
|
|||||||
Destination: testPubKey,
|
Destination: testPubKey,
|
||||||
Features: lnwire.NewFeatureVector(
|
Features: lnwire.NewFeatureVector(
|
||||||
lnwire.NewRawFeatureVector(1, 9),
|
lnwire.NewRawFeatureVector(1, 9),
|
||||||
InvoiceFeatures,
|
lnwire.Features,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -523,7 +523,7 @@ func TestDecodeEncode(t *testing.T) {
|
|||||||
Destination: testPubKey,
|
Destination: testPubKey,
|
||||||
Features: lnwire.NewFeatureVector(
|
Features: lnwire.NewFeatureVector(
|
||||||
lnwire.NewRawFeatureVector(1, 9, 100),
|
lnwire.NewRawFeatureVector(1, 9, 100),
|
||||||
InvoiceFeatures,
|
lnwire.Features,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user