routing: modify findRoute to accept starting node as a paramter
This commit slightly modified findRoute to accept the node which should be used as the starting point in our path finding algorithm. With this change, as we move to a k-shortest paths algorithm this modification will be needed as all of our path finding attempts won’t always originate from a the same starting point.
This commit is contained in:
3 files changed
+37
-20
No files matched your search
+1
-1
@@ -1068,7 +1068,7 @@ func (r *ChannelRouter) FindRoute(target *btcec.PublicKey, amt btcutil.Amount) (
|
||||
}
|
||||
|
||||
// TODO(roasbeef): add k-shortest paths
|
||||
route, err := findRoute(r.cfg.Graph, target, amt)
|
||||
route, err := findRoute(r.cfg.Graph, r.selfNode, target, amt)
|
||||
if err != nil {
|
||||
log.Errorf("Unable to find path: %v", err)
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user