routing: modify findPath to take into account additional edges

In this commit, we modify our path finding algorithm to take an
additional set of edges that are currently not known to us that are
used to temporarily extend our graph with during a payment session.
These edges should assist the sender of a payment in successfully
constructing a path to the destination.

These edges should usually represent private channels, as they are not
publicly advertised to the network for routing.
This commit is contained in:
Wilmer Paulino
2018-03-27 00:14:10 -04:00
parent 7965247db1
commit 4598df054e
4 changed files with 142 additions and 92 deletions

View File

@ -1602,8 +1602,8 @@ 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, sourceNode, target, ignoreVertex, ignoreEdge,
amt,
nil, ctx.graph, nil, sourceNode, target, ignoreVertex,
ignoreEdge, amt,
)
if err != nil {
t.Fatalf("unable to find path: %v", err)