mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 15:02:21 +01:00
Use faster headers' download during initialization
This commit is contained in:
parent
b9b7babf79
commit
32768b128b
1 changed files with 3 additions and 0 deletions
|
@ -341,6 +341,9 @@ impl Daemon {
|
|||
bestblockhash: &Sha256dHash,
|
||||
) -> Result<Vec<BlockHeader>> {
|
||||
// Iterate back over headers until known blockash is found:
|
||||
if indexed_headers.len() == 0 {
|
||||
return self.get_all_headers(bestblockhash);
|
||||
}
|
||||
let mut new_headers = vec![];
|
||||
let null_hash = Sha256dHash::default();
|
||||
let mut blockhash = *bestblockhash;
|
||||
|
|
Loading…
Add table
Reference in a new issue