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