Skip to content

Commit 50633ed

Browse files
committed
Log max routing fee before we start pathfinding
This may be useful in debugging routing failures in the future.
1 parent 75443b1 commit 50633ed

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lightning/src/routing/router.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -1622,9 +1622,13 @@ where L::Target: Logger {
16221622
|info| info.features.supports_basic_mpp()))
16231623
} else { false };
16241624

1625-
log_trace!(logger, "Searching for a route from payer {} to {} {} MPP and {} first hops {}overriding the network graph", our_node_pubkey,
1626-
LoggedPayeePubkey(payment_params.payee.node_id()), if allow_mpp { "with" } else { "without" },
1627-
first_hops.map(|hops| hops.len()).unwrap_or(0), if first_hops.is_some() { "" } else { "not " });
1625+
let max_total_routing_fee_msat = route_params.max_total_routing_fee_msat.unwrap_or(u64::max_value());
1626+
1627+
log_trace!(logger, "Searching for a route from payer {} to {} {} MPP and {} first hops {}overriding the network graph with a fee limit of {} msat",
1628+
our_node_pubkey, LoggedPayeePubkey(payment_params.payee.node_id()),
1629+
if allow_mpp { "with" } else { "without" },
1630+
first_hops.map(|hops| hops.len()).unwrap_or(0), if first_hops.is_some() { "" } else { "not " },
1631+
max_total_routing_fee_msat);
16281632

16291633
// Step (1).
16301634
// Prepare the data we'll use for payee-to-payer search by
@@ -1890,7 +1894,6 @@ where L::Target: Logger {
18901894
}
18911895

18921896
// Ignore hops if augmenting the current path to them would put us over `max_total_routing_fee_msat`
1893-
let max_total_routing_fee_msat = route_params.max_total_routing_fee_msat.unwrap_or(u64::max_value());
18941897
if total_fee_msat > max_total_routing_fee_msat {
18951898
if should_log_candidate {
18961899
log_trace!(logger, "Ignoring {} due to exceeding max total routing fee limit.", LoggedCandidateHop(&$candidate));

0 commit comments

Comments
 (0)