Commit Graph

6 Commits

Author SHA1 Message Date
Joost Jager
6006549ed5
routing: enforce cltv limit in path finding 2019-03-19 10:36:45 +01:00
Joost Jager
a779004a18
lnrpc+routing: fix issues with missing data in unmarshallRoute
In this commit the dependency of unmarshallRoute on edge policies being
available is removed. Edge policies may be unknown and reported as nil.
SendToRoute does not need the policies, but it does need pubkeys of the
route hops. In this commit, unmarshallRoute is modified so that it
takes the pubkeys from edgeInfo instead of channelEdgePolicy.

In addition to this, the route structure is simplified. No more connection
to the database at that point. Fees are determined based on incoming and
outgoing amounts.
2018-10-13 22:59:23 +02:00
Joost Jager
3e7473f4f0 routing: backward searching 2018-08-09 20:23:40 -07:00
Olaoluwa Osuntokun
528aa67df7
routing: weight findPath more heavily towards fees during edge relaxation
In this commit, we modify the edgeWeight function that’s used within
the findPath method to weight fees more heavily than the time lock
value at an edge. We do this in order to greedily prefer lower fees
during path finding. This is a simple stop gap in place of more complex
weighting parameters that will be investigated later.

We also modify the edge distance to use an int64 rather than a float.
Finally an additional test has been added in order to excessive this
new change. Before the commit, the test was failing as we preferred the
route with lower total time lock.
2018-02-12 16:27:38 -08:00
Olaoluwa Osuntokun
9f96ceb1e0
routing: introduce new heap for storing candidate shortest paths
This commit adds a new heap structure to heap.go which will be used for
storing candidate paths during the iterations of the k-shortest paths
algorithm.
2017-03-21 12:20:30 -07:00
Olaoluwa Osuntokun
606b23df43
routing: introduce a heap to keep track of closest nodes during pathfinding
This commit introduces a new heap struct that will be used to keep
track of the next closest node to the source during path finding within
our modified Dijkstra's algorithm.
2017-03-21 12:20:18 -07:00