From 7e4f9dd70a59ca6dd66ee20bdc02175d77ae9efc Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Thu, 21 Nov 2019 12:39:08 +0100 Subject: [PATCH] routing/test: simplify context instantiation --- routing/pathfind_test.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/routing/pathfind_test.go b/routing/pathfind_test.go index 6cde16003..d12a01882 100644 --- a/routing/pathfind_test.go +++ b/routing/pathfind_test.go @@ -2299,16 +2299,13 @@ func newPathFindingTestContext(t *testing.T, testChannels []*testChannel, t: t, testGraphInstance: testGraphInstance, source: route.Vertex(sourceNode.PubKeyBytes), + pathFindingConfig: *testPathFindingConfig, + graphParams: graphParams{ + graph: testGraphInstance.graph, + }, + restrictParams: *noRestrictions, } - ctx.pathFindingConfig = *testPathFindingConfig - - ctx.graphParams.graph = testGraphInstance.graph - - ctx.restrictParams.FeeLimit = noFeeLimit - ctx.restrictParams.ProbabilitySource = noProbabilitySource - ctx.restrictParams.CltvLimit = math.MaxUint32 - return ctx }