Don't consider a path as having hit HTLC-min if it isn't sufficient
authorMatt Corallo <git@bluematt.me>
Thu, 24 Mar 2022 18:38:43 +0000 (18:38 +0000)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 1 Apr 2022 02:36:22 +0000 (21:36 -0500)
commit8ddfe660461d79632a3a275bb1a00445a6c8c626
tree63c1c887db6c935128070b0d6459b2051954d5e2
parentf9cdf93da0039c81150a802b94f3b9ac7c68c08e
Don't consider a path as having hit HTLC-min if it isn't sufficient

During the first pass of path finding, we seek a single path with the
exact payment amount, and only seek additional paths if (a) no single
path can carry the entire balance of the payment or (b) we found a good
path, but along the way we found candidate paths with the potential to
result in a lower total fee. This commit fixes the behavior of (b) -- we
were previously considering some paths to be candidates for a lower fee
when in fact they never would have worked. This caused us to re-run
Dijkstra's when it might not have been beneficial.
lightning/src/routing/router.rs