From bff55cb705fe41d514f94659bf44acd4e2eee00b Mon Sep 17 00:00:00 2001 From: Andrey Samokhvalov Date: Thu, 16 Feb 2017 15:34:49 +0300 Subject: [PATCH] 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. --- features.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 features.go diff --git a/features.go b/features.go new file mode 100644 index 000000000..43b253c27 --- /dev/null +++ b/features.go @@ -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{}