Update bitcoin crate to 0.29.0
[rust-lightning] / lightning-block-sync / src / convert.rs
index 8023c83751920647caecb9ecb67288cc0cfc6506..ed28833b7b30d4986fe53e2801d2ddaf43dcf765 100644 (file)
@@ -15,6 +15,7 @@ use serde_json;
 use std::convert::From;
 use std::convert::TryFrom;
 use std::convert::TryInto;
+use bitcoin::hashes::Hash;
 
 /// Conversion from `std::io::Error` into `BlockSourceError`.
 impl From<std::io::Error> for BlockSourceError {
@@ -57,7 +58,7 @@ impl TryInto<BlockHeaderData> for JsonResponse {
 
                // Add an empty previousblockhash for the genesis block.
                if let None = header.get("previousblockhash") {
-                       let hash: BlockHash = Default::default();
+                       let hash: BlockHash = BlockHash::all_zeros();
                        header.as_object_mut().unwrap().insert("previousblockhash".to_string(), serde_json::json!(hash.to_hex()));
                }