graph/db: let GraphCache.UpdatePolicy take a cached policy

Update the GraphCache.UpdatePolicy method to take a
`models.CachedEdgePolicy` instead of a `models.ChannelEdgePolicy`.
Doing this will allow us later on to only fetch the necessary info for
populating the CachedEdgePolicy when we are populating the cache via
UpdatePolicy.
This commit is contained in:
Elle Mouton committed 2025-06-10 20:10:35 +02:00
1 parent 0816645328
commit 42c6e951ed
3 files changed
+16 -5

No files matched your search

+3 -1
View File
@@ -566,7 +566,9 @@ func (c *ChannelGraph) UpdateEdgePolicy(edge *models.ChannelEdgePolicy,
}
if c.graphCache != nil {
c.graphCache.UpdatePolicy(edge, from, to)
c.graphCache.UpdatePolicy(
models.NewCachedPolicy(edge), from, to,
)
}
select {