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

Fixed one more case of sync stalling #590

Merged
merged 1 commit into from
Mar 4, 2016
Merged

Fixed one more case of sync stalling #590

merged 1 commit into from
Mar 4, 2016

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Mar 4, 2016

No description provided.

@@ -475,7 +475,7 @@ impl ChainSync {
peer.latest_number = Some(header.number());
}
// TODO: Decompose block and add to self.headers and self.bodies instead
if header.number == From::from(self.current_base_block() + 1) {
if header.number <= From::from(self.current_base_block() + 1) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Allow import of stale NewBlocks

@arkpar
Copy link
Collaborator Author

arkpar commented Mar 4, 2016

The sync could stall in case a block body download request is issued and while it is active a NewBlock arrives with the same block and the body request times out.

@arkpar arkpar added the A0-pleasereview 🤓 Pull request needs code review. label Mar 4, 2016
@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 4, 2016
gavofyork pushed a commit that referenced this pull request Mar 4, 2016
Fixed one more case of sync stalling
@gavofyork gavofyork merged commit d7b49c9 into master Mar 4, 2016
@gavofyork gavofyork deleted the sync-fix branch March 4, 2016 22:51
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