From: Matt Corallo Date: Sat, 27 Mar 2021 01:58:01 +0000 (-0400) Subject: wip X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=301cf6318cfa3880f99eb9ec14afaf3ec8ae80c8;p=rust-lightning wip --- diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index 2ae3218e1..b5eec1c51 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -674,7 +674,7 @@ pub fn get_route(our_node_id: &PublicKey, network: &NetworkGraph, paye // the fees included in $incl_fee_next_hops_htlc_minimum_msat, but also // can't use something that may decrease on future hops. let old_cost = cmp::max(old_entry.total_fee_msat, old_entry.path_htlc_minimum_msat); - let new_cost = cmp::max(total_fee_msat, $incl_fee_next_hops_htlc_minimum_msat); + let new_cost = cmp::max(total_fee_msat, path_htlc_minimum_msat); if new_cost < old_cost { targets.push(new_graph_node); @@ -691,7 +691,7 @@ pub fn get_route(our_node_id: &PublicKey, network: &NetworkGraph, paye }; old_entry.channel_fees = $directional_info.fees; old_entry.htlc_minimum_msat = $directional_info.htlc_minimum_msat; - old_entry.path_htlc_minimum_msat = $incl_fee_next_hops_htlc_minimum_msat; + old_entry.path_htlc_minimum_msat = path_htlc_minimum_msat; } } }