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
@@ -1710,6 +1710,8 @@ where L::Target: Logger {
1710
1710
letmut num_ignored_cltv_delta_limit = 0;
1711
1711
letmut num_ignored_previously_failed = 0;
1712
1712
letmut num_ignored_total_fee_limit = 0;
1713
+
letmut num_ignored_avoid_overpayment = 0;
1714
+
letmut num_ignored_htlc_minimum_msat_limit = 0;
1713
1715
1714
1716
macro_rules! add_entry {
1715
1717
// Adds entry which goes from $src_node_id to $dest_node_id over the $candidate hop.
@@ -1817,6 +1819,12 @@ where L::Target: Logger {
1817
1819
}
1818
1820
num_ignored_previously_failed += 1;
1819
1821
} else if may_overpay_to_meet_path_minimum_msat {
1822
+
if should_log_candidate {
1823
+
log_trace!(logger,
1824
+
"Ignoring {} to avoid overpaying to meet htlc_minimum_msat limit.",
1825
+
LoggedCandidateHop(&$candidate));
1826
+
}
1827
+
num_ignored_avoid_overpayment += 1;
1820
1828
hit_minimum_limit = true;
1821
1829
} else if over_path_minimum_msat {
1822
1830
// Note that low contribution here (limited by available_liquidity_msat)
@@ -1966,6 +1974,13 @@ where L::Target: Logger {
1966
1974
}
1967
1975
}
1968
1976
}
1977
+
} else {
1978
+
if should_log_candidate {
1979
+
log_trace!(logger,
1980
+
"Ignoring {} due to its htlc_minimum_msat limit.",
1981
+
LoggedCandidateHop(&$candidate));
1982
+
}
1983
+
num_ignored_htlc_minimum_msat_limit += 1;
1969
1984
}
1970
1985
}
1971
1986
}
@@ -2428,15 +2443,22 @@ where L::Target: Logger {
2428
2443
log_trace!(logger,"Collected exactly our payment amount on the first pass, without hitting an htlc_minimum_msat limit, exiting.");
2429
2444
break'paths_collection;
2430
2445
}
2431
-
log_trace!(logger,"Collected our payment amount on the first pass, but running again to collect extra paths with a potentially higher limit.");
2446
+
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.");
2432
2447
path_value_msat = recommended_value_msat;
2433
2448
}
2434
2449
}
2435
2450
2436
2451
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);
2456
+
log_trace!(logger,
2457
+
"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