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:
Elle Mouton committed 2025-05-22 14:14:40 +02:00
1 parent 449684de87
commit 526fb7f181
8 files changed
+36 -39

No files matched your search

+4 -3
View File
@@ -615,9 +615,10 @@ func createTestPeer(t *testing.T) *peerTestCtx {
})
require.NoError(t, err)
dbAliceGraph, err := graphdb.NewChannelGraph(&graphdb.Config{
KVDB: graphBackend,
})
graphStore, err := graphdb.NewKVStore(graphBackend)
require.NoError(t, err)
dbAliceGraph, err := graphdb.NewChannelGraph(graphStore)
require.NoError(t, err)
require.NoError(t, dbAliceGraph.Start())
t.Cleanup(func() {