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:
3 files changed
+16
-5
No files matched your search
+3
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user