projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #2694 from Evanfeenstra/public-scid-utils
[rust-lightning]
/
lightning-transaction-sync
/
src
/
electrum.rs
diff --git
a/lightning-transaction-sync/src/electrum.rs
b/lightning-transaction-sync/src/electrum.rs
index 07e11338905370d9385dc7d5259053b624055ea4..d0c8afef77e3161ec191f41a0ceae4aa5eb8efe0 100644
(file)
--- a/
lightning-transaction-sync/src/electrum.rs
+++ b/
lightning-transaction-sync/src/electrum.rs
@@
-86,6
+86,7
@@
where
let mut sync_state = self.sync_state.lock().unwrap();
log_trace!(self.logger, "Starting transaction sync.");
let mut sync_state = self.sync_state.lock().unwrap();
log_trace!(self.logger, "Starting transaction sync.");
+ #[cfg(feature = "time")]
let start_time = Instant::now();
let mut num_confirmed = 0;
let mut num_unconfirmed = 0;
let start_time = Instant::now();
let mut num_confirmed = 0;
let mut num_unconfirmed = 0;
@@
-210,10
+211,15
@@
where
sync_state.pending_sync = false;
}
}
sync_state.pending_sync = false;
}
}
+ #[cfg(feature = "time")]
log_debug!(self.logger,
"Finished transaction sync at tip {} in {}ms: {} confirmed, {} unconfirmed.",
tip_header.block_hash(), start_time.elapsed().as_millis(), num_confirmed,
num_unconfirmed);
log_debug!(self.logger,
"Finished transaction sync at tip {} in {}ms: {} confirmed, {} unconfirmed.",
tip_header.block_hash(), start_time.elapsed().as_millis(), num_confirmed,
num_unconfirmed);
+ #[cfg(not(feature = "time"))]
+ log_debug!(self.logger,
+ "Finished transaction sync at tip {}: {} confirmed, {} unconfirmed.",
+ tip_header.block_hash(), num_confirmed, num_unconfirmed);
Ok(())
}
Ok(())
}