graph/db: init KVStore outside of ChannelGraph
So that we can pass in the abstract V1Store in preparation for adding a SQL implementation of the KVStore.
This commit is contained in:
8 files changed
+36
-39
No files matched your search
@@ -1093,9 +1093,11 @@ func makeTestGraph(t *testing.T, useCache bool) *graphdb.ChannelGraph {
|
||||
|
||||
t.Cleanup(backendCleanup)
|
||||
|
||||
graphStore, err := graphdb.NewKVStore(backend)
|
||||
require.NoError(t, err)
|
||||
|
||||
graph, err := graphdb.NewChannelGraph(
|
||||
&graphdb.Config{KVDB: backend},
|
||||
graphdb.WithUseGraphCache(useCache),
|
||||
graphStore, graphdb.WithUseGraphCache(useCache),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, graph.Start())
|
||||
|
||||
Reference in new issue
Block a user