@@ -575,7 +575,7 @@ where L::Target: Logger {
575
575
// any ~sufficient (described later) value.
576
576
// If succeed, remember which channels were used and how much liquidity they have available,
577
577
// so that future paths don't rely on the same liquidity.
578
- // 3. Prooceed to the next step if:
578
+ // 3. Proceed to the next step if:
579
579
// - we hit the recommended target value;
580
580
// - OR if we could not construct a new path. Any next attempt will fail too.
581
581
// Otherwise, repeat step 2.
@@ -593,7 +593,7 @@ where L::Target: Logger {
593
593
//
594
594
// We are not a faithful Dijkstra's implementation because we can change values which impact
595
595
// earlier nodes while processing later nodes. Specifically, if we reach a channel with a lower
596
- // liquidity limit (via htlc_maximum_msat, on-chain capacity or assumed liquidity limits) then
596
+ // liquidity limit (via htlc_maximum_msat, on-chain capacity or assumed liquidity limits) than
597
597
// the value we are currently attempting to send over a path, we simply reduce the value being
598
598
// sent along the path for any hops after that channel. This may imply that later fees (which
599
599
// we've already tabulated) are lower because a smaller value is passing through the channels
@@ -703,7 +703,7 @@ where L::Target: Logger {
703
703
// This map allows paths to be aware of the channel use by other paths in the same call.
704
704
// This would help to make a better path finding decisions and not "overbook" channels.
705
705
// It is unaware of the directions (except for `outbound_capacity_msat` in `first_hops`).
706
- let mut bookkeeped_channels_liquidity_available_msat = HashMap :: with_capacity ( network_nodes. len ( ) ) ;
706
+ let mut bookkept_channels_liquidity_available_msat = HashMap :: with_capacity ( network_nodes. len ( ) ) ;
707
707
708
708
// Keeping track of how much value we already collected across other paths. Helps to decide:
709
709
// - how much a new path should be transferring (upper bound);
@@ -718,7 +718,7 @@ where L::Target: Logger {
718
718
// Adds entry which goes from $src_node_id to $dest_node_id
719
719
// over the channel with id $chan_id with fees described in
720
720
// $directional_info.
721
- // $next_hops_fee_msat represents the fees paid for using all the channel *after* this one,
721
+ // $next_hops_fee_msat represents the fees paid for using all the channels *after* this one,
722
722
// since that value has to be transferred over this channel.
723
723
// Returns whether this channel caused an update to `targets`.
724
724
( $chan_id: expr, $src_node_id: expr, $dest_node_id: expr, $directional_info: expr, $capacity_sats: expr, $chan_features: expr, $next_hops_fee_msat: expr,
@@ -730,7 +730,7 @@ where L::Target: Logger {
730
730
// - for regular channels at channel announcement (TODO)
731
731
// - for first and last hops early in get_route
732
732
if $src_node_id != $dest_node_id. clone( ) {
733
- let available_liquidity_msat = bookkeeped_channels_liquidity_available_msat . entry( $chan_id. clone( ) ) . or_insert_with( || {
733
+ let available_liquidity_msat = bookkept_channels_liquidity_available_msat . entry( $chan_id. clone( ) ) . or_insert_with( || {
734
734
let mut initial_liquidity_available_msat = None ;
735
735
if let Some ( capacity_sats) = $capacity_sats {
736
736
initial_liquidity_available_msat = Some ( capacity_sats * 1000 ) ;
@@ -805,7 +805,7 @@ where L::Target: Logger {
805
805
} else if contributes_sufficient_value {
806
806
// Note that low contribution here (limited by available_liquidity_msat)
807
807
// might violate htlc_minimum_msat on the hops which are next along the
808
- // payment path (upstream to the payee). To avoid that, we recompute path
808
+ // payment path (upstream to the payee). To avoid that, we recompute
809
809
// path fees knowing the final path contribution after constructing it.
810
810
let path_htlc_minimum_msat = compute_fees( $next_hops_path_htlc_minimum_msat, $directional_info. fees)
811
811
. and_then( |fee_msat| fee_msat. checked_add( $next_hops_path_htlc_minimum_msat) )
@@ -1050,7 +1050,7 @@ where L::Target: Logger {
1050
1050
// TODO: diversify by nodes (so that all paths aren't doomed if one node is offline).
1051
1051
' paths_collection: loop {
1052
1052
// For every new path, start from scratch, except
1053
- // bookkeeped_channels_liquidity_available_msat , which will improve
1053
+ // bookkept_channels_liquidity_available_msat , which will improve
1054
1054
// the further iterations of path finding. Also don't erase first_hop_targets.
1055
1055
targets. clear ( ) ;
1056
1056
dist. clear ( ) ;
@@ -1284,7 +1284,7 @@ where L::Target: Logger {
1284
1284
// on the same liquidity in future paths.
1285
1285
let mut prevented_redundant_path_selection = false ;
1286
1286
for ( payment_hop, _) in payment_path. hops . iter ( ) {
1287
- let channel_liquidity_available_msat = bookkeeped_channels_liquidity_available_msat . get_mut ( & payment_hop. short_channel_id ) . unwrap ( ) ;
1287
+ let channel_liquidity_available_msat = bookkept_channels_liquidity_available_msat . get_mut ( & payment_hop. short_channel_id ) . unwrap ( ) ;
1288
1288
let mut spent_on_hop_msat = value_contribution_msat;
1289
1289
let next_hops_fee_msat = payment_hop. next_hops_fee_msat ;
1290
1290
spent_on_hop_msat += next_hops_fee_msat;
@@ -1301,7 +1301,7 @@ where L::Target: Logger {
1301
1301
// Decrease the available liquidity of a hop in the middle of the path.
1302
1302
let victim_scid = payment_path. hops [ ( payment_path. hops . len ( ) - 1 ) / 2 ] . 0 . short_channel_id ;
1303
1303
log_trace ! ( logger, "Disabling channel {} for future path building iterations to avoid duplicates." , victim_scid) ;
1304
- let victim_liquidity = bookkeeped_channels_liquidity_available_msat . get_mut ( & victim_scid) . unwrap ( ) ;
1304
+ let victim_liquidity = bookkept_channels_liquidity_available_msat . get_mut ( & victim_scid) . unwrap ( ) ;
1305
1305
* victim_liquidity = 0 ;
1306
1306
}
1307
1307
0 commit comments