channeldb: convert FetchOtherNode to ChannelGraph method

To prepare for the `kvdb.Backend` member of `ChannelEdgeInfo` being
removed, the `FetchOtherNode` method is moved from the `ChannelEdgeInfo`
to the `ChannelGraph` struct.
This commit is contained in:
Elle Mouton committed 2023-11-08 14:50:34 +02:00
1 parent 6d878c65fc
commit 9dc1a1dfec
2 files changed
+8 -6

No files matched your search

+3 -1
View File
@@ -3107,7 +3107,9 @@ func (s *server) establishPersistentConnections() error {
// We'll now fetch the peer opposite from us within this
// channel so we can queue up a direct connection to them.
channelPeer, err := chanInfo.FetchOtherNode(tx, selfPub)
channelPeer, err := s.graphDB.FetchOtherNode(
tx, chanInfo, selfPub,
)
if err != nil {
return fmt.Errorf("unable to fetch channel peer for "+
"ChannelPoint(%v): %v", chanInfo.ChannelPoint,