multi+refactor: create ForEachNodeChannel with no tx param

In prep for a clean Graph DB interface, we add a version of
ForEachNodeChannel that does not take in an existing db transaction.
This commit is contained in:
Elle Mouton committed 2024-07-15 15:13:58 +02:00
1 parent c20d759d41
commit e9c89ae0ec
6 files changed
+28 -12

No files matched your search

+1 -1
View File
@@ -3119,7 +3119,7 @@ func (s *server) establishPersistentConnections() error {
// TODO(roasbeef): instead iterate over link nodes and query graph for
// each of the nodes.
selfPub := s.identityECDH.PubKey().SerializeCompressed()
err = s.graphDB.ForEachNodeChannel(nil, sourceNode.PubKeyBytes, func(
err = s.graphDB.ForEachNodeChannel(sourceNode.PubKeyBytes, func(
tx kvdb.RTx,
chanInfo *models.ChannelEdgeInfo,
policy, _ *models.ChannelEdgePolicy) error {