routing: define graphParams and restrictParams
To avoid the findPath parameter list getting out of hand, we define new structs that wraps the mandatory and optional parameters to findPath.
This commit is contained in:
4 files changed
+183
-46
No files matched your search
@@ -1872,8 +1872,15 @@ func TestFindPathFeeWeighting(t *testing.T) {
|
||||
// the edge weighting, we should select the direct path over the 2 hop
|
||||
// path even though the direct path has a higher potential time lock.
|
||||
path, err := findPath(
|
||||
nil, ctx.graph, nil, sourceNode, target, ignoreVertex,
|
||||
ignoreEdge, amt, noFeeLimit, nil,
|
||||
&graphParams{
|
||||
graph: ctx.graph,
|
||||
},
|
||||
&restrictParams{
|
||||
ignoredNodes: ignoreVertex,
|
||||
ignoredEdges: ignoreEdge,
|
||||
feeLimit: noFeeLimit,
|
||||
},
|
||||
sourceNode, target, amt,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to find path: %v", err)
|
||||
|
||||
Reference in new issue
Block a user