mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-02 03:54:26 +02:00
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:
@@ -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