From 86283b0d0668b64b605db1e47b1f891ae9f62557 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 18 Oct 2017 21:29:42 -0700 Subject: [PATCH] routing: make setting source node optional when parsing testdata --- routing/pathfind_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/routing/pathfind_test.go b/routing/pathfind_test.go index 78f0e86fd..da503b5e9 100644 --- a/routing/pathfind_test.go +++ b/routing/pathfind_test.go @@ -209,9 +209,11 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err } } - // Set the selected source node - if err := graph.SetSourceNode(source); err != nil { - return nil, nil, nil, err + if source != nil { + // Set the selected source node + if err := graph.SetSourceNode(source); err != nil { + return nil, nil, nil, err + } } // With all the vertexes inserted, we can now insert the edges into the