routing: allow nil maps for ignored edges and nodes

This allows removing a lot of empty map initialization code and makes
the code more readable.
This commit is contained in:
Joost Jager
2019-03-05 11:42:25 +01:00
parent b2b28b49b1
commit 4376f3e1bd
3 changed files with 31 additions and 91 deletions

View File

@ -1949,9 +1949,6 @@ func TestFindPathFeeWeighting(t *testing.T) {
t.Fatalf("unable to fetch source node: %v", err)
}
ignoreVertex := make(map[Vertex]struct{})
ignoreEdge := make(map[EdgeLocator]struct{})
amt := lnwire.MilliSatoshi(100)
target := ctx.aliases["luoji"]
@ -1967,9 +1964,7 @@ func TestFindPathFeeWeighting(t *testing.T) {
graph: ctx.graph,
},
&RestrictParams{
IgnoredNodes: ignoreVertex,
IgnoredEdges: ignoreEdge,
FeeLimit: noFeeLimit,
FeeLimit: noFeeLimit,
},
sourceNode, target, amt,
)