From: Matt Corallo Date: Sun, 19 May 2024 18:35:04 +0000 (+0000) Subject: Log how many nodes/channels we have synced when we try to route X-Git-Tag: v0.0.124-beta~119^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2024-06-log-chan-count;p=rust-lightning 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. --- diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index 8744761e7..a3f7f1532 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -1989,10 +1989,11 @@ where L::Target: Logger { let max_total_routing_fee_msat = route_params.max_total_routing_fee_msat.unwrap_or(u64::max_value()); - log_trace!(logger, "Searching for a route from payer {} to {} {} MPP and {} first hops {}overriding the network graph with a fee limit of {} msat", + 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", our_node_pubkey, LoggedPayeePubkey(payment_params.payee.node_id()), if allow_mpp { "with" } else { "without" }, first_hops.map(|hops| hops.len()).unwrap_or(0), if first_hops.is_some() { "" } else { "not " }, + network_graph.nodes().len(), network_graph.channels().len(), max_total_routing_fee_msat); // Step (1).