mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 09:54:09 +01:00
Update index logging
This commit is contained in:
parent
e5ecd13658
commit
e5da12a5e8
@ -79,7 +79,6 @@ fn run_server(config: &Config) {
|
|||||||
store.compact_if_needed();
|
store.compact_if_needed();
|
||||||
drop(store); // to be re-opened soon
|
drop(store); // to be re-opened soon
|
||||||
|
|
||||||
info!("{:?} indexed successfully", index.headers_list());
|
|
||||||
let store = store::DBStore::open(config.db_path(), store::StoreOptions { auto_compact: true });
|
let store = store::DBStore::open(config.db_path(), store::StoreOptions { auto_compact: true });
|
||||||
let query = query::Query::new(&store, &daemon, &index);
|
let query = query::Query::new(&store, &daemon, &index);
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ use bitcoin::network::serialize::{deserialize, serialize};
|
|||||||
use bitcoin::util::hash::Sha256dHash;
|
use bitcoin::util::hash::Sha256dHash;
|
||||||
use crypto::digest::Digest;
|
use crypto::digest::Digest;
|
||||||
use crypto::sha2::Sha256;
|
use crypto::sha2::Sha256;
|
||||||
use log::Level;
|
|
||||||
use pbr;
|
use pbr;
|
||||||
use std::io::{stderr, Stderr};
|
use std::io::{stderr, Stderr};
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
@ -358,12 +357,7 @@ impl Index {
|
|||||||
.iter()
|
.iter()
|
||||||
.filter(|entry| !indexed_headers.contains_key(&entry.hash()))
|
.filter(|entry| !indexed_headers.contains_key(&entry.hash()))
|
||||||
.collect();
|
.collect();
|
||||||
log!(
|
info!(
|
||||||
if missing_headers.is_empty() {
|
|
||||||
Level::Debug
|
|
||||||
} else {
|
|
||||||
Level::Info
|
|
||||||
},
|
|
||||||
"{:?} ({} left to index)",
|
"{:?} ({} left to index)",
|
||||||
current_headers,
|
current_headers,
|
||||||
missing_headers.len(),
|
missing_headers.len(),
|
||||||
|
Loading…
Reference in New Issue
Block a user