+//! Utilities that handle persisting Rust-Lightning data to disk via standard filesystem APIs.
+
#![deny(broken_intra_doc_links)]
+#![deny(missing_docs)]
mod util;
}
}
+ /// Get the directory which was provided when this persister was initialized.
pub fn get_data_dir(&self) -> String {
self.path_to_channel_data.clone()
}
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()]}, CHAN_CONFIRM_DEPTH);
check_closed_broadcast!(nodes[1], false);
check_added_monitors!(nodes[1], 1);