Skip to content

downloader: different sync strategy#18085

Merged
karalabe merged 2 commits intoethereum:masterfrom
holiman:downloader_span
Nov 16, 2018
Merged

downloader: different sync strategy#18085
karalabe merged 2 commits intoethereum:masterfrom
holiman:downloader_span

Conversation

@holiman
Copy link
Copy Markdown
Contributor

@holiman holiman commented Nov 12, 2018

This PR contains the downloader-specific things from #17973 . However, the change in strategy (to hone in on the remote head, instead of the local head) may not be the best strategy without changing the how blockchain import works.

This PR separates out the strategy into a separate method, with testcases, so it's pretty easy to make changes to it and ensure that a given strategy matches what is expected (it is currently pretty difficult to understand exactly what will happen).

@holiman holiman requested a review from karalabe as a code owner November 12, 2018 13:22
@karalabe karalabe added this to the 1.8.19 milestone Nov 14, 2018
Copy link
Copy Markdown
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

SGTM

Copy link
Copy Markdown
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

Ah no, a light client test crashes.

Comment thread eth/downloader/downloader.go Outdated
Copy link
Copy Markdown
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM. Will merge on green.

Comment thread eth/downloader/downloader_test.go Outdated
Comment thread eth/downloader/downloader_test.go Outdated
Comment thread eth/downloader/downloader_test.go Outdated
@holiman
Copy link
Copy Markdown
Contributor Author

holiman commented Nov 14, 2018

Sorry for sloppy tests, fixed!

@karalabe karalabe force-pushed the downloader_span branch 2 times, most recently from 86b9af0 to 5d91e8c Compare November 16, 2018 11:18
@holiman
Copy link
Copy Markdown
Contributor Author

holiman commented Nov 16, 2018

LGTM

@karalabe karalabe merged commit 91c66d4 into ethereum:master Nov 16, 2018
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants