X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-persister%2Fsrc%2Flib.rs;h=b277c30ca8cfc9024a6de613f5ad7fea4b7d65c1;hb=b50f59d0e5f38719eeef5d8aa7040aeb385e26ab;hp=3e32791711e1428746eaadef6f26f11248370439;hpb=a600eee87c96ee8865402e86bb1865011bf2d2de;p=rust-lightning diff --git a/lightning-persister/src/lib.rs b/lightning-persister/src/lib.rs index 3e327917..b277c30c 100644 --- a/lightning-persister/src/lib.rs +++ b/lightning-persister/src/lib.rs @@ -1,6 +1,9 @@ //! Utilities that handle persisting Rust-Lightning data to disk via standard filesystem APIs. +// Prefix these with `rustdoc::` when we update our MSRV to be >= 1.52 to remove warnings. #![deny(broken_intra_doc_links)] +#![deny(private_intra_doc_links)] + #![deny(missing_docs)] #![cfg_attr(docsrs, feature(doc_auto_cfg))] @@ -134,7 +137,7 @@ mod tests { use crate::FilesystemPersister; use bitcoin::blockdata::block::{Block, BlockHeader}; use bitcoin::hashes::hex::FromHex; - use bitcoin::Txid; + use bitcoin::{Txid, TxMerkleNode}; use lightning::chain::ChannelMonitorUpdateErr; use lightning::chain::chainmonitor::Persist; use lightning::chain::transaction::OutPoint; @@ -144,6 +147,7 @@ mod tests { use lightning::util::events::{ClosureReason, MessageSendEventsProvider}; use lightning::util::test_utils; use std::fs; + use bitcoin::hashes::Hash; #[cfg(target_os = "windows")] use { lightning::get_event_msg, @@ -221,7 +225,7 @@ 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: nodes[0].best_block_hash(), merkle_root: Default::default(), time: 42, bits: 42, nonce: 42 }; + let header = BlockHeader { version: 0x20000000, prev_blockhash: nodes[0].best_block_hash(), merkle_root: TxMerkleNode::all_zeros(), 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], true); check_closed_event!(nodes[1], 1, ClosureReason::CommitmentTxConfirmed);