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
@@ -4725,10 +4725,10 @@ func MakeTestGraph(t testing.TB, modifiers ...KVStoreOptionModifier) (
|
||||
return nil, err
|
||||
}
|
||||
|
||||
graph, err := NewChannelGraph(&Config{
|
||||
KVDB: backend,
|
||||
KVStoreOpts: modifiers,
|
||||
})
|
||||
graphStore, err := NewKVStore(backend, modifiers...)
|
||||
require.NoError(t, err)
|
||||
|
||||
graph, err := NewChannelGraph(graphStore)
|
||||
if err != nil {
|
||||
backendCleanup()
|
||||
|
||||
|
||||
Reference in new issue
Block a user