Skip to content

Commit

Permalink
Don't call system time in std
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Dec 17, 2023
1 parent 4deb263 commit 072ea02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lightning-transaction-sync/src/esplora.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ where
let mut sync_state = self.sync_state.lock().await;

log_trace!(self.logger, "Starting transaction sync.");
#[cfg(feature = "std")]
let start_time = Instant::now();
let mut num_confirmed = 0;
let mut num_unconfirmed = 0;
Expand Down Expand Up @@ -227,8 +228,12 @@ where
sync_state.pending_sync = false;
}
}
#[cfg(feature = "std")]
log_debug!(self.logger, "Finished transaction sync at tip {} in {}ms: {} confirmed, {} unconfirmed.",
tip_hash, start_time.elapsed().as_millis(), num_confirmed, num_unconfirmed);
#[cfg(not(feature = "std"))]
log_debug!(self.logger, "Finished transaction sync at tip {}: {} confirmed, {} unconfirmed.",
tip_hash, num_confirmed, num_unconfirmed);
Ok(())
}

Expand Down

0 comments on commit 072ea02

Please sign in to comment.