Commit Graph
12 Commits
Author SHA1 Message Date
Joost Jager 29b6bae4ed routing: convert fee limit test to table-driven 2018-08-09 20:23:40 -07:00
Joost Jager 3e7473f4f0 routing: backward searching 2018-08-09 20:23:40 -07:00
Joost Jager e52d829168 routing: path finding test refactored 2018-08-09 20:23:40 -07:00
Joost Jager 6c918a1806 channeldb: store unknown policies in database
The commit ensures that for every channel, there will always
be two entries in the edges bucket. If the policy from one or
both ends of the channel is unknown, it is marked as such.

This allows efficient lookup of incoming edges. This is
required for backwards payment path finding.
2018-08-09 20:23:40 -07:00
Joost Jager b52796749f routing: new weight function
In this commit, a new weight function is introduced. This will create a
meaningful effect of time lock on route selection. Also, removes the
squaring of the fee term. This led to suboptimal routes.

Unit test added that covers the weight function and asserts that the
lowest fee route is indeed returned.
2018-06-28 14:52:39 +02:00
Joost Jager 416f368979 routing: add time lock asserts to NewRoute test
This comment extends the unit tests for NewRoute with checks
on the total time lock for a route as well as the expected time
lock values for every hop along the route.
2018-06-28 14:04:02 +02:00
Joost Jager d4471878df routing: fix route fee calculation and channel capacity check
This commit fixes the logic inside the newRoute function to
address the following problems:

- Fee calculation for a hop does not include the fee that needs
  to be paid to the next hop.

- The incoming channel capacity "sanity" check does not include
  the fee to be paid to the current hop.
2018-06-28 13:53:45 +02:00
Joost Jager 70ff4414d9 lnd_test: use different fee policy in multi hop payment test
This change makes the test more sensitive to bugs than a route
with nodes that all enforce the same fee policy.

In addition to that, the fee has been increased to a level
at which potential problems with improper fee calculation
become detectable (and not disappear in rounding).
2018-06-28 13:53:45 +02:00
Joost Jager 52392d836c lnrpc: add ClosedChannels call 2018-06-13 08:48:33 +02:00
Joost Jager cc1d833ee4 lncli: add closedchannels command 2018-06-13 08:48:01 +02:00
Joost Jager f80ea51f69 rpcserver: add ClosedChannels call 2018-06-13 08:48:01 +02:00
Joost Jager f07e2076f8 gitignore: exclude debug binaries 2018-06-13 08:48:00 +02:00