graph/db: let GraghCache.AddChannel take CachedEdgeInfo

Define a new CachedEdgeInfo type and let the graph cache's AddChannel
use this. This will let us later on (for the SQL impl of the graph db)
only load from the DB what we actually need for the graph cache.
This commit is contained in:
Elle Mouton committed 2025-06-10 20:10:35 +02:00
1 parent 3ea86bfbf4
commit 3069a67b62
4 files changed
+38 -5

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ func (c *GraphCache) AddNodeFeatures(node route.Vertex,
// and policy 2 does not matter, the directionality is extracted from the info
// and policy flags automatically. The policy will be set as the outgoing policy
// on one node and the incoming policy on the peer's side.
func (c *GraphCache) AddChannel(info *models.ChannelEdgeInfo,
func (c *GraphCache) AddChannel(info *models.CachedEdgeInfo,
policy1, policy2 *models.CachedEdgePolicy) {
if info == nil {