routing: make setting source node optional when parsing testdata

This commit is contained in:
Olaoluwa Osuntokun committed 2017-10-22 18:36:47 -07:00
1 parent e70031da7b
commit 86283b0d06
1 file changed
+2
+2
View File
@@ -209,10 +209,12 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
} }
} }
if source != nil {
// Set the selected source node // Set the selected source node
if err := graph.SetSourceNode(source); err != nil { if err := graph.SetSourceNode(source); err != nil {
return nil, nil, nil, err return nil, nil, nil, err
} }
}
// With all the vertexes inserted, we can now insert the edges into the // With all the vertexes inserted, we can now insert the edges into the
// test graph. // test graph.