Skip to content

Commit 041c45d

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 09e4c3d commit 041c45d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/routing/router.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,13 +1678,13 @@ where L::Target: Logger {
16781678
// Adds entry which goes from $src_node_id to $dest_node_id over the $candidate hop.
16791679
// $next_hops_fee_msat represents the fees paid for using all the channels *after* this one,
16801680
// since that value has to be transferred over this channel.
1681-
// Returns whether this channel caused an update to `targets`.
1681+
// Returns the contribution amount of $candidate if the channel caused an update to `targets`.
16821682
( $candidate: expr, $src_node_id: expr, $dest_node_id: expr, $next_hops_fee_msat: expr,
16831683
$next_hops_value_contribution: expr, $next_hops_path_htlc_minimum_msat: expr,
16841684
$next_hops_path_penalty_msat: expr, $next_hops_cltv_delta: expr, $next_hops_path_length: expr ) => { {
16851685
// We "return" whether we updated the path at the end, and how much we can route via
16861686
// this channel, via this:
1687-
let mut did_add_update_path_to_src_node = None;
1687+
let mut hop_contribution_amt_msat = None;
16881688
// Channels to self should not be used. This is more of belt-and-suspenders, because in
16891689
// practice these cases should be caught earlier:
16901690
// - for regular channels at channel announcement (TODO)
@@ -1890,7 +1890,7 @@ where L::Target: Logger {
18901890
{
18911891
old_entry.value_contribution_msat = value_contribution_msat;
18921892
}
1893-
did_add_update_path_to_src_node = Some(value_contribution_msat);
1893+
hop_contribution_amt_msat = Some(value_contribution_msat);
18941894
} else if old_entry.was_processed && new_cost < old_cost {
18951895
#[cfg(all(not(ldk_bench), any(test, fuzzing)))]
18961896
{
@@ -1924,7 +1924,7 @@ where L::Target: Logger {
19241924
}
19251925
}
19261926
}
1927-
did_add_update_path_to_src_node
1927+
hop_contribution_amt_msat
19281928
} }
19291929
}
19301930

0 commit comments

Comments
 (0)