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

Prevent syncing to ancient blocks #1693

Merged
merged 2 commits into from Jul 23, 2016
Merged

Prevent syncing to ancient blocks #1693

merged 2 commits into from Jul 23, 2016

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Jul 22, 2016

No description provided.

@arkpar arkpar added the A0-pleasereview 🤓 Pull request needs code review. label Jul 22, 2016
@arkpar arkpar changed the title Don't try to sync to ancient blocks Prevent syncing to ancient blocks Jul 22, 2016
@gavofyork
Copy link
Contributor

why would we ever try to sync to an ancient block? surely it'd have a much lower total difficulty anyway?

@arkpar
Copy link
Collaborator Author

arkpar commented Jul 23, 2016

The NewHash message does not contain total difficulty info, only the block number. So an unknown header was set to be downloaded. This adds an additional check for the block number difference.

@coveralls
Copy link

coveralls commented Jul 23, 2016

Coverage Status

Coverage decreased (-0.01%) to 75.444% when pulling acc471b on sync-fork into aafb014 on master.

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

None yet

3 participants