Specify whether we have first-hop hints when routing 2022-02-first-hop-log
authorMatt Corallo <git@bluematt.me>
Tue, 15 Feb 2022 20:59:40 +0000 (20:59 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 18 Feb 2022 19:20:18 +0000 (19:20 +0000)
This is incredibly useful when debugging issues with the router,
and is somewhat of an oversight currently.

lightning/src/routing/router.rs

index dc2f8fd1196a1848af7390af2bc7642c9265f1df..2cd9c79a2fff62807ee9b5dc719d6c1b221aeef7 100644 (file)
@@ -719,8 +719,9 @@ where L::Target: Logger {
                        node_info.features.supports_basic_mpp()
                } else { false }
        } else { false };
-       log_trace!(logger, "Searching for a route from payer {} to payee {} {} MPP", our_node_pubkey,
-               payment_params.payee_pubkey, if allow_mpp { "with" } else { "without" });
+       log_trace!(logger, "Searching for a route from payer {} to payee {} {} MPP and {} first hops {}overriding the network graph", our_node_pubkey,
+               payment_params.payee_pubkey, if allow_mpp { "with" } else { "without" },
+               first_hops.map(|hops| hops.len()).unwrap_or(0), if first_hops.is_some() { "" } else { "not " });
 
        // Step (1).
        // Prepare the data we'll use for payee-to-payer search by