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

-28
View File
@@ -65,34 +65,6 @@ var (
}
)
// MakeTestGraph creates a new instance of the ChannelGraph for testing purposes.
func MakeTestGraph(t testing.TB, modifiers ...OptionModifier) (*ChannelGraph, error) {
opts := DefaultOptions()
for _, modifier := range modifiers {
modifier(opts)
}
// Next, create channelgraph for the first time.
backend, backendCleanup, err := kvdb.GetTestBackend(t.TempDir(), "cgr")
if err != nil {
backendCleanup()
return nil, err
}
graph, err := NewChannelGraph(backend)
if err != nil {
backendCleanup()
return nil, err
}
t.Cleanup(func() {
_ = backend.Close()
backendCleanup()
})
return graph, nil
}
func createLightningNode(db kvdb.Backend, priv *btcec.PrivateKey) (*LightningNode, error) {
updateTime := prand.Int63()