diff --git a/src/logger.rs b/src/logger.rs index cab62c61d..b0504a354 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -1,5 +1,5 @@ pub(crate) use lightning::util::logger::Logger; -pub(crate) use lightning::{log_debug, log_error, log_info, log_trace}; +pub(crate) use lightning::{log_bytes, log_debug, log_error, log_info, log_trace}; use lightning::util::logger::{Level, Record}; use lightning::util::ser::Writer; diff --git a/src/tx_broadcaster.rs b/src/tx_broadcaster.rs index 9ecf2a50b..4e56cbafe 100644 --- a/src/tx_broadcaster.rs +++ b/src/tx_broadcaster.rs @@ -1,6 +1,7 @@ -use crate::logger::{log_debug, log_error, log_trace, Logger}; +use crate::logger::{log_bytes, log_debug, log_error, log_trace, Logger}; use lightning::chain::chaininterface::BroadcasterInterface; +use lightning::util::ser::Writeable; use esplora_client::AsyncClient as EsploraClient; @@ -66,6 +67,11 @@ where tx.txid(), e ); + log_trace!( + self.logger, + "Failed broadcast transaction bytes: {}", + log_bytes!(tx.encode()) + ); } } } @@ -76,6 +82,11 @@ where tx.txid(), e ); + log_trace!( + self.logger, + "Failed broadcast transaction bytes: {}", + log_bytes!(tx.encode()) + ); } }, }