Browse Source
Use parse_hash() for Daemon::getblocktxids()
skip-invalid-blocks
Roman Zeyde
6 years ago
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB
1 changed files with
2 additions and
4 deletions
-
src/daemon.rs
|
|
@ -483,10 +483,8 @@ impl Daemon { |
|
|
|
.as_array() |
|
|
|
.chain_err(|| "invalid block txids")? |
|
|
|
.iter() |
|
|
|
.map(|txid| { |
|
|
|
Sha256dHash::from_hex(txid.as_str().chain_err(|| "txid not string")?) |
|
|
|
.chain_err(|| "invalid hex") |
|
|
|
}).collect::<Result<Vec<Sha256dHash>>>() |
|
|
|
.map(|txid| parse_hash(txid)) |
|
|
|
.collect::<Result<Vec<Sha256dHash>>>() |
|
|
|
} |
|
|
|
|
|
|
|
pub fn getblocks(&self, blockhashes: &[Sha256dHash]) -> Result<Vec<Block>> { |
|
|
|