mirror of
https://github.com/romanz/electrs.git
synced 2025-02-23 14:50:45 +01:00
Improve logging during block headers' download
This commit is contained in:
parent
7832be013d
commit
35c8c1d000
1 changed files with 6 additions and 0 deletions
|
@ -393,6 +393,7 @@ impl Daemon {
|
|||
let mut result = vec![];
|
||||
let null_hash = Sha256dHash::default();
|
||||
for heights in all_heights.chunks(chunk_size) {
|
||||
debug!("downloading {} block headers", heights.len());
|
||||
let mut headers = self.getblockheaders(&heights)?;
|
||||
assert!(headers.len() == heights.len());
|
||||
result.append(&mut headers);
|
||||
|
@ -417,6 +418,11 @@ impl Daemon {
|
|||
if indexed_headers.len() == 0 {
|
||||
return self.get_all_headers(bestblockhash);
|
||||
}
|
||||
debug!(
|
||||
"downloading new block headers ({} already indexed) from {}",
|
||||
indexed_headers.len(),
|
||||
bestblockhash,
|
||||
);
|
||||
let mut new_headers = vec![];
|
||||
let null_hash = Sha256dHash::default();
|
||||
let mut blockhash = *bestblockhash;
|
||||
|
|
Loading…
Add table
Reference in a new issue