Merge pull request #2466 from TheBlueMatt/2023-07-expose-success-prob
[rust-lightning] / lightning / src / util / macro_logger.rs
index 6e98272f3171d2bc47082c4171b6e4013800e911..e79980370342ff01920fe5a37b4423719a228ac7 100644 (file)
@@ -8,7 +8,7 @@
 // licenses.
 
 use crate::chain::transaction::OutPoint;
-use crate::chain::keysinterface::SpendableOutputDescriptor;
+use crate::sign::SpendableOutputDescriptor;
 
 use bitcoin::hash_types::Txid;
 use bitcoin::blockdata::transaction::Transaction;
@@ -17,6 +17,12 @@ use crate::routing::router::Route;
 use crate::ln::chan_utils::HTLCClaim;
 use crate::util::logger::DebugBytes;
 
+macro_rules! log_iter {
+       ($obj: expr) => {
+               $crate::util::logger::DebugIter($obj)
+       }
+}
+
 /// Logs a pubkey in hex format.
 #[macro_export]
 macro_rules! log_pubkey {
@@ -65,9 +71,10 @@ impl<'a> core::fmt::Display for DebugRoute<'a> {
        fn fmt(&self, f: &mut core::fmt::Formatter) -> Result<(), core::fmt::Error> {
                for (idx, p) in self.0.paths.iter().enumerate() {
                        writeln!(f, "path {}:", idx)?;
-                       for h in p.iter() {
+                       for h in p.hops.iter() {
                                writeln!(f, " node_id: {}, short_channel_id: {}, fee_msat: {}, cltv_expiry_delta: {}", log_pubkey!(h.pubkey), h.short_channel_id, h.fee_msat, h.cltv_expiry_delta)?;
                        }
+                       writeln!(f, " blinded_tail: {:?}", p.blinded_tail)?;
                }
                Ok(())
        }