watchtower/wtwire/features: remove local/global feature names...

in favor of a universal FeatureNames index.
This commit is contained in:
Conner Fromknecht 2019-02-08 20:02:05 -08:00
parent 40df51eaaa
commit 4c7111256e
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
2 changed files with 4 additions and 8 deletions

@ -306,7 +306,7 @@ func (s *Server) handleInit(localInit, remoteInit *wtwire.Init) error {
} }
remoteConnFeatures := lnwire.NewFeatureVector( remoteConnFeatures := lnwire.NewFeatureVector(
remoteInit.ConnFeatures, wtwire.LocalFeatures, remoteInit.ConnFeatures, wtwire.FeatureNames,
) )
unknownLocalFeatures := remoteConnFeatures.UnknownRequiredFeatures() unknownLocalFeatures := remoteConnFeatures.UnknownRequiredFeatures()

@ -2,13 +2,9 @@ package wtwire
import "github.com/lightningnetwork/lnd/lnwire" import "github.com/lightningnetwork/lnd/lnwire"
// GlobalFeatures holds the globally advertised feature bits understood by // FeatureNames holds a mapping from each feature bit understood by this
// watchtower implementations. // implementation to its common name.
var GlobalFeatures map[lnwire.FeatureBit]string var FeatureNames = map[lnwire.FeatureBit]string{
// LocalFeatures holds the locally advertised feature bits understood by
// watchtower implementations.
var LocalFeatures = map[lnwire.FeatureBit]string{
WtSessionsRequired: "wt-sessions", WtSessionsRequired: "wt-sessions",
WtSessionsOptional: "wt-sessions", WtSessionsOptional: "wt-sessions",
} }