graph/db: move Topology client management to ChannelGraph

We plan to later on add an option for a remote graph source which will
be managed from the ChannelGraph. In such a set-up, a node would rely on
the remote graph source for graph updates instead of from gossip sync.
In this scenario, however, our topology subscription logic should still
notify clients of all updates and so it makes more sense to have the
logic as part of the ChannelGraph so that we can send updates we receive
from the remote graph.
This commit is contained in:
Elle Mouton committed 2025-03-24 15:05:48 +02:00
1 parent 4131b3fc7e
commit 2221aaa889
9 files changed
+209 -158

No files matched your search

+1 -1
View File
@@ -417,7 +417,7 @@ type server struct {
// updatePersistentPeerAddrs subscribes to topology changes and stores
// advertised addresses for any NodeAnnouncements from our persisted peers.
func (s *server) updatePersistentPeerAddrs() error {
graphSub, err := s.graphBuilder.SubscribeTopology()
graphSub, err := s.graphDB.SubscribeTopology()
if err != nil {
return err
}