mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 22:50:58 +02:00
Merge pull request #9544 from lightningnetwork/elle-graphCacheBase
graph: move graph cache out of CRUD layer
This commit is contained in:
@@ -167,11 +167,16 @@ func makeTestGraph(t *testing.T, useCache bool) (*graphdb.ChannelGraph,
|
||||
t.Cleanup(backendCleanup)
|
||||
|
||||
graph, err := graphdb.NewChannelGraph(
|
||||
backend, graphdb.WithUseGraphCache(useCache),
|
||||
&graphdb.Config{KVDB: backend},
|
||||
graphdb.WithUseGraphCache(useCache),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
require.NoError(t, graph.Start())
|
||||
t.Cleanup(func() {
|
||||
require.NoError(t, graph.Stop())
|
||||
})
|
||||
|
||||
return graph, backend, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user