watchtower: add filter function to ListTowers

And then only load active towers on client start up.
This commit is contained in:
Elle Mouton
2023-11-24 12:14:04 +02:00
parent ffd355c6c4
commit 0bb1816fff
4 changed files with 22 additions and 6 deletions

View File

@@ -455,7 +455,7 @@ func (m *Manager) Stats() ClientStats {
func (m *Manager) RegisteredTowers(opts ...wtdb.ClientSessionListOption) (
map[blob.Type][]*RegisteredTower, error) {
towers, err := m.cfg.DB.ListTowers()
towers, err := m.cfg.DB.ListTowers(nil)
if err != nil {
return nil, err
}