Browse Source
Log more information in case of invalid hash
refactor-mempool
Roman Zeyde
6 years ago
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB
1 changed files with
6 additions and
4 deletions
-
src/daemon.rs
|
|
@ -26,10 +26,12 @@ pub enum Network { |
|
|
|
} |
|
|
|
|
|
|
|
fn parse_hash(value: &Value) -> Result<Sha256dHash> { |
|
|
|
Ok( |
|
|
|
Sha256dHash::from_hex(value.as_str().chain_err(|| "non-string value")?) |
|
|
|
.chain_err(|| "non-hex value")?, |
|
|
|
) |
|
|
|
Ok(Sha256dHash::from_hex(value |
|
|
|
.as_str() |
|
|
|
.chain_err(|| format!("non-string value: {}", value))?) |
|
|
|
.chain_err(|| { |
|
|
|
format!("non-hex value: {}", value) |
|
|
|
})?) |
|
|
|
} |
|
|
|
|
|
|
|
fn header_from_value(value: Value) -> Result<BlockHeader> { |
|
|
|