Roman Zeyde
6 years ago
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB
3 changed files with
3 additions and
3 deletions
-
src/config.rs
-
src/daemon.rs
-
src/index.rs
|
|
@ -196,7 +196,7 @@ impl Config { |
|
|
|
Network::Testnet => daemon_dir.push("testnet3"), |
|
|
|
Network::Regtest => daemon_dir.push("regtest"), |
|
|
|
} |
|
|
|
let cookie = m.value_of("cookie").map(|s| s.to_owned()); |
|
|
|
let cookie = m.value_of("cookie").map(std::borrow::ToOwned::to_owned); |
|
|
|
|
|
|
|
let mut log = stderrlog::new(); |
|
|
|
log.verbosity(m.occurrences_of("verbosity") as usize); |
|
|
|
|
|
@ -367,7 +367,7 @@ impl Daemon { |
|
|
|
info!("listing block files at {:?}", path); |
|
|
|
let mut paths: Vec<PathBuf> = glob::glob(path.to_str().unwrap()) |
|
|
|
.chain_err(|| "failed to list blk*.dat files")? |
|
|
|
.map(|res| res.unwrap()) |
|
|
|
.map(std::result::Result::unwrap) |
|
|
|
.collect(); |
|
|
|
paths.sort(); |
|
|
|
Ok(paths) |
|
|
|
|
|
@ -254,7 +254,7 @@ fn read_indexed_headers(store: &ReadStore) -> HeaderList { |
|
|
|
assert_eq!( |
|
|
|
headers |
|
|
|
.last() |
|
|
|
.map(|h| h.bitcoin_hash()) |
|
|
|
.map(BitcoinHash::bitcoin_hash) |
|
|
|
.unwrap_or(null_hash), |
|
|
|
latest_blockhash |
|
|
|
); |
|
|
|