#[cfg(test)]
const FRESHNESS_TIMER: u64 = 1;
+#[cfg(not(debug_assertions))]
const PING_TIMER: u64 = 5;
+/// Signature operations take a lot longer without compiler optimisations.
+/// Increasing the ping timer allows for this but slower devices will be disconnected if the
+/// timeout is reached.
+#[cfg(debug_assertions)]
+const PING_TIMER: u64 = 30;
/// Trait which handles persisting a [`ChannelManager`] to disk.
///
let stop_thread = Arc::new(AtomicBool::new(false));
let stop_thread_clone = stop_thread.clone();
let handle = thread::spawn(move || -> Result<(), std::io::Error> {
+ log_trace!(logger, "Calling ChannelManager's timer_tick_occurred on startup");
+ channel_manager.timer_tick_occurred();
+
let mut last_freshness_call = Instant::now();
let mut last_ping_call = Instant::now();
loop {