]> git.bitcoin.ninja Git - rust-lightning/blobdiff - background-processor/src/lib.rs
Enforce no missing docs in all crates (+ add docs that were missing)
[rust-lightning] / background-processor / src / lib.rs
index 00f984580f2556fae736a4b7c153caf23839ff58..286bfeddf155123668200e2d5971979bd558d714 100644 (file)
@@ -1,3 +1,11 @@
+//! Utilities that take care of tasks that (1) need to happen periodically to keep Rust-Lightning
+//! running properly, and (2) either can or should be run in the background. See docs for
+//! [`BackgroundProcessor`] for more details on the nitty-gritty.
+
+#![deny(broken_intra_doc_links)]
+#![deny(missing_docs)]
+#![deny(unsafe_code)]
+
 #[macro_use] extern crate lightning;
 
 use lightning::chain;
@@ -66,7 +74,7 @@ impl BackgroundProcessor {
                let handle = thread::spawn(move || -> Result<(), std::io::Error> {
                        let mut current_time = Instant::now();
                        loop {
-                               let updates_available = manager.wait_timeout(Duration::from_millis(100));
+                               let updates_available = manager.await_persistable_update_timeout(Duration::from_millis(100));
                                if updates_available {
                                        persist_manager(&*manager)?;
                                }
@@ -268,7 +276,7 @@ mod tests {
                loop {
                        let log_entries = nodes[0].logger.lines.lock().unwrap();
                        let desired_log = "Calling manager's timer_chan_freshness_every_min".to_string();
-                       if log_entries.get(&("background_processor".to_string(), desired_log)).is_some() {
+                       if log_entries.get(&("lightning_background_processor".to_string(), desired_log)).is_some() {
                                break
                        }
                }