routing+routerrpc: expose mission control state over rpc

This commit exposes mission control state for rpc for development
purposes.
This commit is contained in:
Joost Jager committed 2019-06-04 10:00:27 +02:00
1 parent 7133f37bb8
commit f7982f0f4c
5 files changed
+536 -81

No files matched your search

+10
View File
@@ -64,4 +64,14 @@ func TestMissionControl(t *testing.T) {
// to zero.
mc.reportVertexFailure(testNode)
expectP(1000, 0)
// Check whether history snapshot looks sane.
history := mc.GetHistorySnapshot()
if len(history.Nodes) != 1 {
t.Fatal("unexpected number of nodes")
}
if len(history.Nodes[0].Channels) != 1 {
t.Fatal("unexpected number of channels")
}
}