features: add global/local feature maps

In this commit the feature maps were added which which binds the name
of the global feature with it index in feature vector. The index is
just an order of the feature and the final binary representation of
feature vector is determined by decode function. This maps helps to
operate with feature by their names rather than their indexes.
This commit is contained in:
Andrey Samokhvalov 2017-02-16 15:34:49 +03:00 committed by Olaoluwa Osuntokun
parent 3dd619fb35
commit bff55cb705

13
features.go Normal file
View File

@ -0,0 +1,13 @@
package main
import "github.com/lightningnetwork/lnd/lnwire"
// globalFeaturesMap is a map which binds the name of the global feature with it
// index. The index is just an order of the feature and the final binary
// representation of feature vector is determined by decode function.
var globalFeaturesMap = lnwire.FeaturesMap{}
// localFeaturesMap is a map which binds the name of the local feature with it
// index. The index is just an order of the feature and the final binary
// representation of feature vector is determined by decode function.
var localFeaturesMap = lnwire.FeaturesMap{}