routing/test: simplify context instantiation

This commit is contained in:
Joost Jager 2019-11-21 12:39:08 +01:00
parent 949a5c5a04
commit 7e4f9dd70a
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7

@ -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
}