@@ -575,7 +575,7 @@ where L::Target: Logger {
575575 // any ~sufficient (described later) value.
576576 // If succeed, remember which channels were used and how much liquidity they have available,
577577 // 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:
579579 // - we hit the recommended target value;
580580 // - OR if we could not construct a new path. Any next attempt will fail too.
581581 // Otherwise, repeat step 2.
@@ -593,7 +593,7 @@ where L::Target: Logger {
593593 //
594594 // We are not a faithful Dijkstra's implementation because we can change values which impact
595595 // 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
597597 // the value we are currently attempting to send over a path, we simply reduce the value being
598598 // sent along the path for any hops after that channel. This may imply that later fees (which
599599 // we've already tabulated) are lower because a smaller value is passing through the channels
@@ -703,7 +703,7 @@ where L::Target: Logger {
703703 // This map allows paths to be aware of the channel use by other paths in the same call.
704704 // This would help to make a better path finding decisions and not "overbook" channels.
705705 // 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 ( ) ) ;
707707
708708 // Keeping track of how much value we already collected across other paths. Helps to decide:
709709 // - how much a new path should be transferring (upper bound);
@@ -718,7 +718,7 @@ where L::Target: Logger {
718718 // Adds entry which goes from $src_node_id to $dest_node_id
719719 // over the channel with id $chan_id with fees described in
720720 // $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,
722722 // since that value has to be transferred over this channel.
723723 // Returns whether this channel caused an update to `targets`.
724724 ( $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 {
730730 // - for regular channels at channel announcement (TODO)
731731 // - for first and last hops early in get_route
732732 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( || {
734734 let mut initial_liquidity_available_msat = None ;
735735 if let Some ( capacity_sats) = $capacity_sats {
736736 initial_liquidity_available_msat = Some ( capacity_sats * 1000 ) ;
@@ -805,7 +805,7 @@ where L::Target: Logger {
805805 } else if contributes_sufficient_value {
806806 // Note that low contribution here (limited by available_liquidity_msat)
807807 // 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
809809 // path fees knowing the final path contribution after constructing it.
810810 let path_htlc_minimum_msat = compute_fees( $next_hops_path_htlc_minimum_msat, $directional_info. fees)
811811 . and_then( |fee_msat| fee_msat. checked_add( $next_hops_path_htlc_minimum_msat) )
@@ -1050,7 +1050,7 @@ where L::Target: Logger {
10501050 // TODO: diversify by nodes (so that all paths aren't doomed if one node is offline).
10511051 ' paths_collection: loop {
10521052 // 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
10541054 // the further iterations of path finding. Also don't erase first_hop_targets.
10551055 targets. clear ( ) ;
10561056 dist. clear ( ) ;
@@ -1284,7 +1284,7 @@ where L::Target: Logger {
12841284 // on the same liquidity in future paths.
12851285 let mut prevented_redundant_path_selection = false ;
12861286 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 ( ) ;
12881288 let mut spent_on_hop_msat = value_contribution_msat;
12891289 let next_hops_fee_msat = payment_hop. next_hops_fee_msat ;
12901290 spent_on_hop_msat += next_hops_fee_msat;
@@ -1301,7 +1301,7 @@ where L::Target: Logger {
13011301 // Decrease the available liquidity of a hop in the middle of the path.
13021302 let victim_scid = payment_path. hops [ ( payment_path. hops . len ( ) - 1 ) / 2 ] . 0 . short_channel_id ;
13031303 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 ( ) ;
13051305 * victim_liquidity = 0 ;
13061306 }
13071307
0 commit comments