mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-08 14:31:53 +02:00
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:
@ -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