feature: add ListSets function

This commit is contained in:
carla 2019-12-17 21:58:28 +02:00
parent c27d60b6d1
commit 496434259a
No known key found for this signature in database
GPG Key ID: 4CA7FE54A6213C91

@ -108,3 +108,14 @@ func (m *Manager) Get(set Set) *lnwire.FeatureVector {
raw := m.GetRaw(set) raw := m.GetRaw(set)
return lnwire.NewFeatureVector(raw, lnwire.Features) return lnwire.NewFeatureVector(raw, lnwire.Features)
} }
// ListSets returns a list of the feature sets that our node supports.
func (m *Manager) ListSets() []Set {
var sets []Set
for set := range m.fsets {
sets = append(sets, set)
}
return sets
}