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

Parallel block body download #1659

Merged
merged 1 commit into from
Jul 25, 2016
Merged

Parallel block body download #1659

merged 1 commit into from
Jul 25, 2016

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Jul 18, 2016

More aggressive parallel downloading of block bodies.

@arkpar arkpar added the A0-pleasereview 🤓 Pull request needs code review. label Jul 18, 2016
@coveralls
Copy link

coveralls commented Jul 18, 2016

Coverage Status

Coverage decreased (-0.01%) to 76.543% when pulling 41f09b2 on sync into 18f1661 on master.

@gavofyork
Copy link
Contributor

not sure i fully understand the logic, but does seem to be doing roughly the right thing.

@arkpar
Copy link
Collaborator Author

arkpar commented Jul 20, 2016

Currently we only download bodies for the headers in the first subchain. This change allows idle peers to download all missing bodies, while still prioritizing those in the front of the queue.

@arkpar
Copy link
Collaborator Author

arkpar commented Jul 20, 2016

I've been testing this branch on zero.parity.io for 2 days, no issues so far.

}
if !self.downloading_bodies.contains(h) {
needed_bodies.push(h.clone());
self.downloading_bodies.insert(h.clone());
Copy link
Contributor

@rphmeier rphmeier Jul 23, 2016

Choose a reason for hiding this comment

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

entry API could save a HashSet lookup here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

HashSet does not have one

@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 25, 2016
@gavofyork gavofyork merged commit d0e79be into master Jul 25, 2016
@gavofyork gavofyork deleted the sync branch July 25, 2016 16:38
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.

4 participants