From 88acbd098aabc5bc777b69cca322e8e804d1f6bf Mon Sep 17 00:00:00 2001 From: Richard Holzeis Date: Fri, 15 Sep 2023 15:30:36 +0200 Subject: [PATCH] chore: Add logs around periodic check Adding these logs to debug whether the periodic check interferes with the processing of DLC message. --- crates/ln-dlc-node/src/node/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/ln-dlc-node/src/node/mod.rs b/crates/ln-dlc-node/src/node/mod.rs index f1e226dc5..04b0ab66f 100644 --- a/crates/ln-dlc-node/src/node/mod.rs +++ b/crates/ln-dlc-node/src/node/mod.rs @@ -761,6 +761,8 @@ fn manage_sub_channels( let (fut, remote_handle) = { async move { loop { + tracing::trace!("Started periodic check"); + let now = Instant::now(); if let Err(e) = sub_channel_manager_periodic_check( sub_channel_manager.clone(), &dlc_message_handler, @@ -770,6 +772,11 @@ fn manage_sub_channels( tracing::error!("Failed to process pending DLC actions: {e:#}"); }; + tracing::trace!( + duration = now.elapsed().as_millis(), + "Finished periodic check" + ); + let interval = { let guard = settings.read().await; guard.sub_channel_manager_periodic_check_interval