@@ -1710,13 +1710,13 @@ where L::Target: Logger {
1710
1710
// Adds entry which goes from $src_node_id to $dest_node_id over the $candidate hop.
1711
1711
// $next_hops_fee_msat represents the fees paid for using all the channels *after* this one,
1712
1712
// since that value has to be transferred over this channel.
1713
- // Returns whether this channel caused an update to `targets`.
1713
+ // Returns the contribution amount of $candidate if the channel caused an update to `targets`.
1714
1714
( $candidate: expr, $src_node_id: expr, $dest_node_id: expr, $next_hops_fee_msat: expr,
1715
1715
$next_hops_value_contribution: expr, $next_hops_path_htlc_minimum_msat: expr,
1716
1716
$next_hops_path_penalty_msat: expr, $next_hops_cltv_delta: expr, $next_hops_path_length: expr ) => { {
1717
1717
// We "return" whether we updated the path at the end, and how much we can route via
1718
1718
// this channel, via this:
1719
- let mut did_add_update_path_to_src_node = None ;
1719
+ let mut hop_contribution_amt_msat = None ;
1720
1720
// Channels to self should not be used. This is more of belt-and-suspenders, because in
1721
1721
// practice these cases should be caught earlier:
1722
1722
// - for regular channels at channel announcement (TODO)
@@ -1930,7 +1930,7 @@ where L::Target: Logger {
1930
1930
{
1931
1931
old_entry. value_contribution_msat = value_contribution_msat;
1932
1932
}
1933
- did_add_update_path_to_src_node = Some ( value_contribution_msat) ;
1933
+ hop_contribution_amt_msat = Some ( value_contribution_msat) ;
1934
1934
} else if old_entry. was_processed && new_cost < old_cost {
1935
1935
#[ cfg( all( not( ldk_bench) , any( test, fuzzing) ) ) ]
1936
1936
{
@@ -1965,7 +1965,7 @@ where L::Target: Logger {
1965
1965
}
1966
1966
}
1967
1967
}
1968
- did_add_update_path_to_src_node
1968
+ hop_contribution_amt_msat
1969
1969
} }
1970
1970
}
1971
1971
0 commit comments