watchtower/wtwire/features: remove local/global feature names...
in favor of a universal FeatureNames index.
This commit is contained in:
parent
40df51eaaa
commit
4c7111256e
@ -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",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user