Skip to content

Commit 072ea02

Browse files
committed
Don't call system time in std
1 parent 4deb263 commit 072ea02

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lightning-transaction-sync/src/esplora.rs

+5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ where
9191
let mut sync_state = self.sync_state.lock().await;
9292

9393
log_trace!(self.logger, "Starting transaction sync.");
94+
#[cfg(feature = "std")]
9495
let start_time = Instant::now();
9596
let mut num_confirmed = 0;
9697
let mut num_unconfirmed = 0;
@@ -227,8 +228,12 @@ where
227228
sync_state.pending_sync = false;
228229
}
229230
}
231+
#[cfg(feature = "std")]
230232
log_debug!(self.logger, "Finished transaction sync at tip {} in {}ms: {} confirmed, {} unconfirmed.",
231233
tip_hash, start_time.elapsed().as_millis(), num_confirmed, num_unconfirmed);
234+
#[cfg(not(feature = "std"))]
235+
log_debug!(self.logger, "Finished transaction sync at tip {}: {} confirmed, {} unconfirmed.",
236+
tip_hash, num_confirmed, num_unconfirmed);
232237
Ok(())
233238
}
234239

0 commit comments

Comments
 (0)