routing+autopilot: rename mission control store var
To clearly separate the mission control DB store (which for now will remain kvdb only) from the graph store, we rename the `graphBackend` variable to `mcBackend` in the `testGraphInstance` struct.
This commit is contained in:
2 files changed
+15
-15
No files matched your search
+14
-14
@@ -212,7 +212,7 @@ func parseTestGraph(t *testing.T, useCache bool, path string) (
|
|||||||
testAddrs = append(testAddrs, testAddr)
|
testAddrs = append(testAddrs, testAddr)
|
||||||
|
|
||||||
// Next, create a temporary graph database for usage within the test.
|
// Next, create a temporary graph database for usage within the test.
|
||||||
graph, graphBackend, err := makeTestGraph(t, useCache)
|
graph, mcBackend, err := makeTestGraph(t, useCache)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -412,12 +412,12 @@ func parseTestGraph(t *testing.T, useCache bool, path string) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &testGraphInstance{
|
return &testGraphInstance{
|
||||||
graph: graph,
|
graph: graph,
|
||||||
graphBackend: graphBackend,
|
mcBackend: mcBackend,
|
||||||
aliasMap: aliasMap,
|
aliasMap: aliasMap,
|
||||||
privKeyMap: privKeyMap,
|
privKeyMap: privKeyMap,
|
||||||
channelIDs: channelIDs,
|
channelIDs: channelIDs,
|
||||||
links: links,
|
links: links,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,8 +481,8 @@ type testChannel struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type testGraphInstance struct {
|
type testGraphInstance struct {
|
||||||
graph *graphdb.ChannelGraph
|
graph *graphdb.ChannelGraph
|
||||||
graphBackend kvdb.Backend
|
mcBackend kvdb.Backend
|
||||||
|
|
||||||
// aliasMap is a map from a node's alias to its public key. This type is
|
// aliasMap is a map from a node's alias to its public key. This type is
|
||||||
// provided in order to allow easily look up from the human memorable alias
|
// provided in order to allow easily look up from the human memorable alias
|
||||||
@@ -749,11 +749,11 @@ func createTestGraphFromChannels(t *testing.T, useCache bool,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &testGraphInstance{
|
return &testGraphInstance{
|
||||||
graph: graph,
|
graph: graph,
|
||||||
graphBackend: graphBackend,
|
mcBackend: graphBackend,
|
||||||
aliasMap: aliasMap,
|
aliasMap: aliasMap,
|
||||||
privKeyMap: privKeyMap,
|
privKeyMap: privKeyMap,
|
||||||
links: links,
|
links: links,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ func createTestCtxFromGraphInstanceAssumeValid(t *testing.T,
|
|||||||
mcConfig := &MissionControlConfig{Estimator: estimator}
|
mcConfig := &MissionControlConfig{Estimator: estimator}
|
||||||
|
|
||||||
mcController, err := NewMissionController(
|
mcController, err := NewMissionController(
|
||||||
graphInstance.graphBackend, route.Vertex{}, mcConfig,
|
graphInstance.mcBackend, route.Vertex{}, mcConfig,
|
||||||
)
|
)
|
||||||
require.NoError(t, err, "failed to create missioncontrol")
|
require.NoError(t, err, "failed to create missioncontrol")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user