rust-lightning/lightning/src
Matt Corallo 985153e128 Make route path selection optimize strictly for cost / amount
Currently, after we've selected a number of candidate paths, we
construct a route from a random set of paths repeatedly, and then
select the route with the lowest total cost. In the vast majority
of cases this ends up doing a bunch of additional work in order to
select the path(s) with the total lowest cost, with some vague
attempt at randomization that doesn't actually work.

Instead, here, we simply sort available paths by `cost / amount`
and select the top paths. This ends up in practice having the same
end result with substantially less complexity. In some rare cases
it gets a better result, which also would have been achieved
through more random trials. This implies there may in such cases be
a potential privacy loss, but not a substantial one, given our path
selection is ultimately mostly deterministic in many cases (or, if
it is not, then privacy is achieved through randomization at the
scorer level).
2022-07-19 15:16:35 +00:00
..
chain Make all internal signatures accept LowerBoundedFeeEstimator 2022-07-13 15:00:51 +02:00
ln Track channels which a given payment part failed to traverse 2022-07-14 18:37:25 +00:00
routing Make route path selection optimize strictly for cost / amount 2022-07-19 15:16:35 +00:00
util Merge pull request #1567 from tnull/2022-06-send-probe 2022-07-07 09:27:14 -05:00
debug_sync.rs Create a simple FairRwLock to avoid readers starving writers 2022-05-10 23:40:20 +00:00
lib.rs Re-export core2::io or std::io depending on feature flags 2022-05-31 00:17:40 +00:00
sync.rs Create a simple FairRwLock to avoid readers starving writers 2022-05-10 23:40:20 +00:00