@@ -994,21 +994,21 @@ where L::Target: Logger {
994
994
( amount_to_transfer_over_msat < $next_hops_path_htlc_minimum_msat &&
995
995
recommended_value_msat > $next_hops_path_htlc_minimum_msat) ) ;
996
996
997
- let channel_failed_on_this_payment =
997
+ let payment_failed_on_this_channel =
998
998
payment_params. previously_failed_channels. contains( & short_channel_id) ;
999
999
1000
1000
// If HTLC minimum is larger than the amount we're going to transfer, we shouldn't
1001
1001
// bother considering this channel. If retrying with recommended_value_msat may
1002
1002
// allow us to hit the HTLC minimum limit, set htlc_minimum_limit so that we go
1003
1003
// around again with a higher amount.
1004
1004
if contributes_sufficient_value && doesnt_exceed_max_path_length &&
1005
- doesnt_exceed_cltv_delta_limit && !channel_failed_on_this_payment &&
1005
+ doesnt_exceed_cltv_delta_limit && !payment_failed_on_this_channel &&
1006
1006
may_overpay_to_meet_path_minimum_msat
1007
1007
{
1008
1008
hit_minimum_limit = true ;
1009
1009
} else if contributes_sufficient_value && doesnt_exceed_max_path_length &&
1010
1010
doesnt_exceed_cltv_delta_limit && over_path_minimum_msat &&
1011
- !channel_failed_on_this_payment
1011
+ !payment_failed_on_this_channel
1012
1012
{
1013
1013
// Note that low contribution here (limited by available_liquidity_msat)
1014
1014
// might violate htlc_minimum_msat on the hops which are next along the
@@ -5510,7 +5510,7 @@ mod tests {
5510
5510
5511
5511
#[ test]
5512
5512
fn avoids_recently_failed_paths ( ) {
5513
- // Ensure that the router always avoids all of the `recently_failed_channels ` channels by
5513
+ // Ensure that the router always avoids all of the `previously_failed_channels ` channels by
5514
5514
// randomly inserting channels into it until we can't find a route anymore.
5515
5515
let ( secp_ctx, network, _, _, logger) = build_graph ( ) ;
5516
5516
let ( _, our_id, _, nodes) = get_nodes ( & secp_ctx) ;
0 commit comments