From 496434259a60293da4c9498457526fdf77b6f942 Mon Sep 17 00:00:00 2001 From: carla Date: Tue, 17 Dec 2019 21:58:28 +0200 Subject: [PATCH] feature: add ListSets function --- feature/manager.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/feature/manager.go b/feature/manager.go index 6d9cfe07..01c82123 100644 --- a/feature/manager.go +++ b/feature/manager.go @@ -108,3 +108,14 @@ func (m *Manager) Get(set Set) *lnwire.FeatureVector { raw := m.GetRaw(set) 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 +}