Don't underpay htlc_min due to path contribution
authorGleb Naumenko <naumenko.gs@gmail.com>
Mon, 1 Mar 2021 10:37:51 +0000 (12:37 +0200)
committerGleb Naumenko <naumenko.gs@gmail.com>
Tue, 2 Mar 2021 19:40:08 +0000 (21:40 +0200)
commite0600e5b1edc5be57258a4b28963789dbc69b431
treef7512c2656794f68b9adaf3ccaf9cff5abe2dc34
parent18c773004062410851e68fe944226f8c3255bf17
Don't underpay htlc_min due to path contribution

We could have possibly constructed a slightly inconsistent
path: since we reduce value being transferred all the way, we
could have violated htlc_minimum_msat on some channels
we already passed (assuming dest->source direction). Here,
we recompute the fees again, so that if that's the case, we
match the currently underpaid htlc_minimum_msat with fees.
lightning/src/routing/router.rs