From 2e716bf301a32e1fd96076b8fcbc7b1bb5cc94cc Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Mon, 9 Jun 2025 11:44:36 +0200 Subject: [PATCH] graph/db: remove unused GraphCache method Remove the unused UpdateChannel method. --- graph/db/graph_cache.go | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/graph/db/graph_cache.go b/graph/db/graph_cache.go index 141f610b2..d082c0f8f 100644 --- a/graph/db/graph_cache.go +++ b/graph/db/graph_cache.go @@ -264,34 +264,6 @@ func (c *GraphCache) removeChannelIfFound(node route.Vertex, chanID uint64) { delete(c.nodeChannels[node], chanID) } -// UpdateChannel updates the channel edge information for a specific edge. We -// expect the edge to already exist and be known. If it does not yet exist, this -// call is a no-op. -func (c *GraphCache) UpdateChannel(info *models.ChannelEdgeInfo) { - c.mtx.Lock() - defer c.mtx.Unlock() - - if len(c.nodeChannels[info.NodeKey1Bytes]) == 0 || - len(c.nodeChannels[info.NodeKey2Bytes]) == 0 { - - return - } - - channel, ok := c.nodeChannels[info.NodeKey1Bytes][info.ChannelID] - if ok { - // We only expect to be called when the channel is already - // known. - channel.Capacity = info.Capacity - channel.OtherNode = info.NodeKey2Bytes - } - - channel, ok = c.nodeChannels[info.NodeKey2Bytes][info.ChannelID] - if ok { - channel.Capacity = info.Capacity - channel.OtherNode = info.NodeKey1Bytes - } -} - // getChannels returns a copy of the passed node's channels or nil if there // isn't any. func (c *GraphCache) getChannels(node route.Vertex) []*DirectedChannel {