Skip to content

Commit 7f16039

Browse files
committed
Log how many nodes/channels we have synced when we try to route
A common issue in LN is not having fully synced the network graph when we attempt to send a payment. This should be improved substantially with gossip v1.5, but for now we should improve our debugability by logging how many nodes we have in our graph when we attempt to find a route.
1 parent 1237abf commit 7f16039

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightning/src/routing/router.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,10 +1989,11 @@ where L::Target: Logger {
19891989

19901990
let max_total_routing_fee_msat = route_params.max_total_routing_fee_msat.unwrap_or(u64::max_value());
19911991

1992-
log_trace!(logger, "Searching for a route from payer {} to {} {} MPP and {} first hops {}overriding the network graph with a fee limit of {} msat",
1992+
log_trace!(logger, "Searching for a route from payer {} to {} {} MPP and {} first hops {}overriding the network graph of {} nodes and {} channels with a fee limit of {} msat",
19931993
our_node_pubkey, LoggedPayeePubkey(payment_params.payee.node_id()),
19941994
if allow_mpp { "with" } else { "without" },
19951995
first_hops.map(|hops| hops.len()).unwrap_or(0), if first_hops.is_some() { "" } else { "not " },
1996+
network_graph.nodes().len(), network_graph.channels().len(),
19961997
max_total_routing_fee_msat);
19971998

19981999
// Step (1).

0 commit comments

Comments
 (0)