]> git.bitcoin.ninja Git - rust-lightning/commit
Fix tracking of collected value across pathfinding iterations
authorMatt Corallo <git@bluematt.me>
Tue, 12 Jul 2022 20:30:00 +0000 (20:30 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 19 Jul 2022 15:16:35 +0000 (15:16 +0000)
commit0c3a47c0162c80062005e8187c16ee624498fdfd
tree23f825e5c15a382fab3a02c32298922a38da6319
parentf75b6cb9a8de91594fec9e37f0b2a4bae36b246a
Fix tracking of collected value across pathfinding iterations

If we end up "paying" for an `htlc_minimum_msat` with fees, we
increment `already_collected_value_msat` by more than the amount
of the path that we collected (who's `value_contribution_msat` is
higher than the total payment amount, despite having been reduced
down to the payment amount).

This throws off our total value collection target, though in the
coming commit(s) it would also throw off our path selection
calculations.
lightning/src/routing/router.rs