Skip to content

Commit 5263b07

Browse files
get_route: fix outdated var name
Previously this variable was a bool, but has since been updated to be an Option, so rename accordingly.
1 parent 29c67d5 commit 5263b07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/routing/router.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1710,13 +1710,13 @@ where L::Target: Logger {
17101710
// Adds entry which goes from $src_node_id to $dest_node_id over the $candidate hop.
17111711
// $next_hops_fee_msat represents the fees paid for using all the channels *after* this one,
17121712
// 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`.
17141714
( $candidate: expr, $src_node_id: expr, $dest_node_id: expr, $next_hops_fee_msat: expr,
17151715
$next_hops_value_contribution: expr, $next_hops_path_htlc_minimum_msat: expr,
17161716
$next_hops_path_penalty_msat: expr, $next_hops_cltv_delta: expr, $next_hops_path_length: expr ) => { {
17171717
// We "return" whether we updated the path at the end, and how much we can route via
17181718
// this channel, via this:
1719-
let mut did_add_update_path_to_src_node = None;
1719+
let mut hop_contribution_amt_msat = None;
17201720
// Channels to self should not be used. This is more of belt-and-suspenders, because in
17211721
// practice these cases should be caught earlier:
17221722
// - for regular channels at channel announcement (TODO)
@@ -1930,7 +1930,7 @@ where L::Target: Logger {
19301930
{
19311931
old_entry.value_contribution_msat = value_contribution_msat;
19321932
}
1933-
did_add_update_path_to_src_node = Some(value_contribution_msat);
1933+
hop_contribution_amt_msat = Some(value_contribution_msat);
19341934
} else if old_entry.was_processed && new_cost < old_cost {
19351935
#[cfg(all(not(ldk_bench), any(test, fuzzing)))]
19361936
{
@@ -1965,7 +1965,7 @@ where L::Target: Logger {
19651965
}
19661966
}
19671967
}
1968-
did_add_update_path_to_src_node
1968+
hop_contribution_amt_msat
19691969
} }
19701970
}
19711971

0 commit comments

Comments
 (0)