projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support spontaneous payment retries in ChannelManager
[rust-lightning]
/
lightning-block-sync
/
src
/
convert.rs
diff --git
a/lightning-block-sync/src/convert.rs
b/lightning-block-sync/src/convert.rs
index 8023c83751920647caecb9ecb67288cc0cfc6506..ed28833b7b30d4986fe53e2801d2ddaf43dcf765 100644
(file)
--- a/
lightning-block-sync/src/convert.rs
+++ b/
lightning-block-sync/src/convert.rs
@@
-15,6
+15,7
@@
use serde_json;
use std::convert::From;
use std::convert::TryFrom;
use std::convert::TryInto;
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 {
/// 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") {
// 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()));
}
header.as_object_mut().unwrap().insert("previousblockhash".to_string(), serde_json::json!(hash.to_hex()));
}