Skip to content

Commit

Permalink
chore: Add logs around periodic check
Browse files Browse the repository at this point in the history
Adding these logs to debug whether the periodic check interferes with the processing of DLC message.
  • Loading branch information
holzeis authored and klochowicz committed Sep 15, 2023
1 parent a5f50e7 commit 88acbd0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/ln-dlc-node/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 88acbd0

Please sign in to comment.