channeldb: remove graph db from channeldb

Now that the channel.DB no longer uses the ChannelGraph pointer, we can
completely remove it as a member of channeldb.DB.
This commit is contained in:
Elle Mouton committed 2024-11-28 13:36:15 +02:00
1 parent 2c083bc017
commit b86980ec40
9 files changed
+100 -134

No files matched your search

+4 -9
View File
@@ -51,10 +51,7 @@ func TestOpenWithCreate(t *testing.T) {
require.NoError(t, err, "unable to get test db backend")
t.Cleanup(cleanup)
graphDB, err := graphdb.NewChannelGraph(backend)
require.NoError(t, err)
cdb, err := CreateWithBackend(backend, graphDB)
cdb, err := CreateWithBackend(backend)
require.NoError(t, err, "unable to create channeldb")
if err := cdb.Close(); err != nil {
t.Fatalf("unable to close channeldb: %v", err)
@@ -90,10 +87,7 @@ func TestWipe(t *testing.T) {
require.NoError(t, err, "unable to get test db backend")
t.Cleanup(cleanup)
graphDB, err := graphdb.NewChannelGraph(backend)
require.NoError(t, err)
fullDB, err := CreateWithBackend(backend, graphDB)
fullDB, err := CreateWithBackend(backend)
require.NoError(t, err, "unable to create channeldb")
defer fullDB.Close()
@@ -194,7 +188,8 @@ func TestMultiSourceAddrsForNode(t *testing.T) {
fullDB, err := MakeTestDB(t)
require.NoError(t, err, "unable to make test database")
graph := fullDB.ChannelGraph()
graph, err := graphdb.MakeTestGraph(t)
require.NoError(t, err)
// We'll make a test vertex to insert into the database, as the source
// node, but this node will only have half the number of addresses it