You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lightning/src/routing/router.rs
+25-3Lines changed: 25 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1718,6 +1718,8 @@ where L::Target: Logger {
1718
1718
letmut num_ignored_cltv_delta_limit = 0;
1719
1719
letmut num_ignored_previously_failed = 0;
1720
1720
letmut num_ignored_total_fee_limit = 0;
1721
+
letmut num_ignored_avoid_overpayment = 0;
1722
+
letmut num_ignored_htlc_minimum_msat_limit = 0;
1721
1723
1722
1724
macro_rules! add_entry {
1723
1725
// Adds entry which goes from $src_node_id to $dest_node_id over the $candidate hop.
@@ -1826,6 +1828,12 @@ where L::Target: Logger {
1826
1828
}
1827
1829
num_ignored_previously_failed += 1;
1828
1830
} else if may_overpay_to_meet_path_minimum_msat {
1831
+
if should_log_candidate {
1832
+
log_trace!(logger,
1833
+
"Ignoring {} to avoid overpaying to meet htlc_minimum_msat limit.",
1834
+
LoggedCandidateHop(&$candidate));
1835
+
}
1836
+
num_ignored_avoid_overpayment += 1;
1829
1837
hit_minimum_limit = true;
1830
1838
} else if over_path_minimum_msat {
1831
1839
// Note that low contribution here (limited by available_liquidity_msat)
@@ -1976,6 +1984,13 @@ where L::Target: Logger {
1976
1984
}
1977
1985
}
1978
1986
}
1987
+
} else {
1988
+
if should_log_candidate {
1989
+
log_trace!(logger,
1990
+
"Ignoring {} due to its htlc_minimum_msat limit.",
1991
+
LoggedCandidateHop(&$candidate));
1992
+
}
1993
+
num_ignored_htlc_minimum_msat_limit += 1;
1979
1994
}
1980
1995
}
1981
1996
}
@@ -2443,15 +2458,22 @@ where L::Target: Logger {
2443
2458
log_trace!(logger,"Collected exactly our payment amount on the first pass, without hitting an htlc_minimum_msat limit, exiting.");
2444
2459
break'paths_collection;
2445
2460
}
2446
-
log_trace!(logger,"Collected our payment amount on the first pass, but running again to collect extra paths with a potentially higher limit.");
2461
+
log_trace!(logger,"Collected our payment amount on the first pass, but running again to collect extra paths with a potentially higher value to meet htlc_minimum_msat limit.");
2447
2462
path_value_msat = recommended_value_msat;
2448
2463
}
2449
2464
}
2450
2465
2451
2466
let num_ignored_total = num_ignored_value_contribution + num_ignored_path_length_limit +
log_trace!(logger,"Ignored {} candidate hops due to insufficient value contribution, {} due to path length limit, {} due to CLTV delta limit, {} due to previous payment failure, {} due to maximum total fee limit. Total: {} ignored candidates.", num_ignored_value_contribution, num_ignored_path_length_limit, num_ignored_cltv_delta_limit, num_ignored_previously_failed, num_ignored_total_fee_limit, num_ignored_total);
2471
+
log_trace!(logger,
2472
+
"Ignored {} candidate hops due to insufficient value contribution, {} due to path length limit, {} due to CLTV delta limit, {} due to previous payment failure, {} due to htlc_minimum_msat limit, {} to avoid overpaying, {} due to maximum total fee limit. Total: {} ignored candidates.",
0 commit comments