rust-lightning/lightning
Gleb Naumenko e43cfbd5f1 Consider commitment tx fee while assembling a route
When calculating the amount available to send for the next HTLC, if
we over-count we may create routes which are not actually usable.

Historically this has been an issue, which we resolve over a few
commits.

Here we include the cost of the commitment transaction fee in our
calculation, subtracting the commitment tx fee cost from the
available as we do in `send_payment`.

We also add some testing when sending to ensure that send failures
are accounted for in our balance calculations.

This commit is based on original work by
Gleb Naumenko <naumenko.gs@gmail.com> and modified by
Matt Corallo <git@bluematt.me>.
2023-05-21 19:05:22 +00:00
..
src Consider commitment tx fee while assembling a route 2023-05-21 19:05:22 +00:00
Cargo.toml Replace std's unmaintained bench with criterion 2023-05-11 06:11:49 +00:00