Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Sync optimization #1385

Merged
merged 5 commits into from
Jun 22, 2016
Merged

Sync optimization #1385

merged 5 commits into from
Jun 22, 2016

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Jun 22, 2016

No description provided.

@arkpar arkpar added the A0-pleasereview 🤓 Pull request needs code review. label Jun 22, 2016
@@ -295,6 +295,10 @@ impl BlockCollection {
let old_subchains: HashSet<_> = { self.heads.iter().cloned().collect() };
for s in self.heads.drain(..) {
let mut h = s.clone();
if !self.blocks.contains_key(&h) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed a bug here: If a header is inserted with a number immediately following the chain head it would get updated incorrectly, which led to same blocks requested twice.

@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 22, 2016
@gavofyork gavofyork merged commit 11314a6 into master Jun 22, 2016
@gavofyork gavofyork deleted the sync branch June 22, 2016 10:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants