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 committed 2018-04-20 04:01:32 -04:00
1 parent 7965247db1
commit 4598df054e
4 files changed
+142 -92

No files matched your search

+5 -2
View File
@@ -282,8 +282,11 @@ func (p *paymentSession) RequestRoute(payment *LightningPayment,
// Taking into account this prune view, we'll attempt to locate a path
// to our destination, respecting the recommendations from
// missionControl.
path, err := findPath(nil, p.mc.graph, p.mc.selfNode, payment.Target,
pruneView.vertexes, pruneView.edges, payment.Amount)
path, err := findPath(
nil, p.mc.graph, p.additionalEdges, p.mc.selfNode,
payment.Target, pruneView.vertexes, pruneView.edges,
payment.Amount,
)
if err != nil {
return nil, err
}