Fix two new compiler warnings in fuzz
[rust-lightning] / fuzz / src / chanmon_consistency.rs
index 3e205c07183d402fe045110d562f94b084224155..e7cd990086163910ebd061f798325ac301ee9950 100644 (file)
@@ -234,7 +234,7 @@ fn check_api_err(api_err: APIError) {
                                _ if err.starts_with("Cannot send value that would put our balance under counterparty-announced channel reserve value") => {},
                                _ if err.starts_with("Cannot send value that would overdraw remaining funds.") => {},
                                _ if err.starts_with("Cannot send value that would not leave enough to pay for fees.") => {},
-                               _ => panic!(err),
+                               _ => panic!("{}", err),
                        }
                },
                APIError::MonitorUpdateFailed => {
@@ -432,7 +432,8 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
 
        macro_rules! confirm_txn {
                ($node: expr) => { {
-                       let mut header = BlockHeader { version: 0x20000000, prev_blockhash: Default::default(), merkle_root: Default::default(), time: 42, bits: 42, nonce: 42 };
+                       let chain_hash = genesis_block(Network::Bitcoin).block_hash();
+                       let mut header = BlockHeader { version: 0x20000000, prev_blockhash: chain_hash, merkle_root: Default::default(), time: 42, bits: 42, nonce: 42 };
                        let txdata: Vec<_> = channel_txn.iter().enumerate().map(|(i, tx)| (i + 1, tx)).collect();
                        $node.block_connected(&header, &txdata, 1);
                        for i in 2..100 {