Skip to content

Commit

Permalink
Merge pull request #1303 from get10101/chore/add-logs-around-periodic…
Browse files Browse the repository at this point in the history
…-check

chore: Add logs around periodic check
  • Loading branch information
holzeis authored Sep 15, 2023
2 parents a5f50e7 + 88acbd0 commit b8b3786
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 b8b3786

Please sign in to comment.