Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use total_diff (not height) when banning peers during header sync #2867

Merged
merged 1 commit into from
May 31, 2019
Merged

Conversation

garyyu
Copy link
Contributor

@garyyu garyyu commented May 30, 2019

fix #2865

Copy link
Member

@antiochp antiochp left a comment

Choose a reason for hiding this comment

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

👍
Looks good to me.

current_height: _,
highest_height,
} => {
SyncStatus::HeaderSync { .. } | SyncStatus::BodySync { .. } => {
Copy link
Member

Choose a reason for hiding this comment

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

Do we even need to check for HeaderSync or BodySync here now?
If we got this far then we know we are syncing headers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case a HeaderSync state switched to StateSync and spent several minutes on txhashset downloading, and after that, switching back to HeaderSync.
So, perhaps not bad to check the state here.

Copy link
Member

Choose a reason for hiding this comment

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

👍

@garyyu garyyu merged commit e345405 into mimblewimble:master May 31, 2019
@garyyu garyyu deleted the ban branch May 31, 2019 00:02
@antiochp antiochp added this to the 1.1.0 milestone Jun 5, 2019
@antiochp antiochp added the release notes To be included in release notes (of relevant milestone). label Jun 5, 2019
@antiochp antiochp changed the title fix: fraud peer ban doesn't work in some cases Use total_diff (not height) when banning peers during header sync Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes To be included in release notes (of relevant milestone).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downloading Blocks 110%
3 participants