channeldb: complete migration 12 for TLV invoices

This commit is contained in:
Conner Fromknecht
2019-11-22 02:24:28 -08:00
parent 76682ad820
commit 4c872c438b
10 changed files with 216 additions and 144 deletions

View File

@@ -371,3 +371,10 @@ func (fv *FeatureVector) isFeatureBitPair(bit FeatureBit) bool {
name2, known2 := fv.featureNames[bit^1]
return known1 && known2 && name1 == name2
}
// Clone copies a feature vector, carrying over its feature bits. The feature
// names are not copied.
func (fv *FeatureVector) Clone() *FeatureVector {
features := fv.RawFeatureVector.Clone()
return NewFeatureVector(features, fv.featureNames)
}