Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sync/src/block/downloader/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ impl HeaderDownloader {
pub fn mark_as_imported(&mut self, hashes: Vec<H256>) {
for hash in hashes {
self.queued.remove(&hash);
self.downloaded.remove(&hash);

if self.best_hash == hash {
self.pivot = Pivot {
Expand All @@ -188,6 +189,7 @@ impl HeaderDownloader {
}
}
self.queued.shrink_to_fit();
self.downloaded.shrink_to_fit();
}

pub fn mark_as_queued(&mut self, hashes: Vec<H256>) {
Expand Down