Drop height parameter from [dis]connect_block in functional tests
[rust-lightning] / lightning-persister / src / lib.rs
index 2226bcba6095373f7ae3dc2f7b3db2f7cf5e034c..afcda803397597f12d0d3a597dcf7bff44b3c248 100644 (file)
@@ -1,3 +1,8 @@
+//! Utilities that handle persisting Rust-Lightning data to disk via standard filesystem APIs.
+
+#![deny(broken_intra_doc_links)]
+#![deny(missing_docs)]
+
 mod util;
 
 extern crate lightning;
@@ -72,6 +77,7 @@ impl FilesystemPersister {
                }
        }
 
+       /// Get the directory which was provided when this persister was initialized.
        pub fn get_data_dir(&self) -> String {
                self.path_to_channel_data.clone()
        }
@@ -241,8 +247,8 @@ mod tests {
                let node_txn = nodes[0].tx_broadcaster.txn_broadcasted.lock().unwrap();
                assert_eq!(node_txn.len(), 1);
 
-               let header = BlockHeader { version: 0x20000000, prev_blockhash: Default::default(), merkle_root: Default::default(), time: 42, bits: 42, nonce: 42 };
-               connect_block(&nodes[1], &Block { header, txdata: vec![node_txn[0].clone(), node_txn[0].clone()]}, 1);
+               let header = BlockHeader { version: 0x20000000, prev_blockhash: nodes[0].best_block_hash(), merkle_root: Default::default(), time: 42, bits: 42, nonce: 42 };
+               connect_block(&nodes[1], &Block { header, txdata: vec![node_txn[0].clone(), node_txn[0].clone()]});
                check_closed_broadcast!(nodes[1], false);
                check_added_monitors!(nodes[1], 1);