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
+8
-4
@@ -1046,10 +1046,14 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
|
||||
)
|
||||
}
|
||||
|
||||
dbs.GraphDB, err = graphdb.NewChannelGraph(&graphdb.Config{
|
||||
KVDB: databaseBackends.GraphDB,
|
||||
KVStoreOpts: graphDBOptions,
|
||||
}, chanGraphOpts...)
|
||||
graphStore, err := graphdb.NewKVStore(
|
||||
databaseBackends.GraphDB, graphDBOptions...,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
dbs.GraphDB, err = graphdb.NewChannelGraph(graphStore, chanGraphOpts...)
|
||||
if err != nil {
|
||||
cleanUp()
|
||||
|
||||
|
||||
Reference in new issue
Block a user