mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-28 23:16:35 +01:00
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:
@@ -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