multi: add ChannelGraph Config struct
And use this struct to pass NewChannelGraph anything it needs to be able to init the KVStore that it houses. This will allow us to add ChannelGraph specific options.
This commit is contained in:
8 files changed
+40
-18
No files matched your search
@@ -4005,7 +4005,7 @@ func TestGraphLoading(t *testing.T) {
|
||||
defer backend.Close()
|
||||
defer backendCleanup()
|
||||
|
||||
graph, err := NewChannelGraph(backend)
|
||||
graph, err := NewChannelGraph(&Config{KVDB: backend})
|
||||
require.NoError(t, err)
|
||||
|
||||
// Populate the graph with test data.
|
||||
@@ -4015,7 +4015,7 @@ func TestGraphLoading(t *testing.T) {
|
||||
|
||||
// Recreate the graph. This should cause the graph cache to be
|
||||
// populated.
|
||||
graphReloaded, err := NewChannelGraph(backend)
|
||||
graphReloaded, err := NewChannelGraph(&Config{KVDB: backend})
|
||||
require.NoError(t, err)
|
||||
|
||||
// Assert that the cache content is identical.
|
||||
|
||||
Reference in new issue
Block a user