]> git.bitcoin.ninja Git - rust-lightning/commitdiff
f - WIP: attempt to fix failing tests
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 25 Jan 2022 17:41:47 +0000 (11:41 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 25 Jan 2022 17:42:28 +0000 (11:42 -0600)
lightning/src/routing/router.rs

index a0fafc342d516a837bd4004c10ec4f3509dae60f..45244f53e26171f8cd88d0795dcc0ad3ee6a164d 100644 (file)
@@ -1222,7 +1222,7 @@ where L::Target: Logger {
                                        let params = ChannelUseParameters {
                                                amount_msat: final_value_msat,
                                                inflight_htlc_msat: 0,
-                                               fees_msat: aggregate_next_hops_fee_msat,
+                                               fees_msat: cmp::max(aggregate_next_hops_fee_msat, aggregate_next_hops_path_htlc_minimum_msat),
                                                effective_capacity_msat: candidate.effective_capacity().as_msat(),
                                        };
                                        let channel_cost = scorer.channel_cost(hop.short_channel_id, &source, &target, params);