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:
4 files changed
+142
-92
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user