graph/db: let ChannelGraph init the graphCache
In this commit, we let the ChannelGraph be responsible for populating the graphCache and then passing it to the KVStore. This is a first step in moving the graphCache completely out of the KVStore layer.
This commit is contained in:
8 files changed
+129
-80
No files matched your search
@@ -1093,12 +1093,10 @@ func makeTestGraph(t *testing.T, useCache bool) (*graphdb.ChannelGraph,
|
||||
|
||||
t.Cleanup(backendCleanup)
|
||||
|
||||
graph, err := graphdb.NewChannelGraph(&graphdb.Config{
|
||||
KVDB: backend,
|
||||
KVStoreOpts: []graphdb.KVStoreOptionModifier{
|
||||
graphdb.WithUseGraphCache(useCache),
|
||||
},
|
||||
})
|
||||
graph, err := graphdb.NewChannelGraph(
|
||||
&graphdb.Config{KVDB: backend},
|
||||
graphdb.WithUseGraphCache(useCache),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user