Repository navigation
Conversation
Record that a valid 12-field seeder line parses, that shorter lines are skipped, and that a line missing only the user agent still aborts the run.
DNS seeder lines contain 12 whitespace-separated fields ending with the user agent. `parseline()` skipped only lines with fewer than 11 fields but reads the user agent from `sline[11]`. A truncated line with exactly 11 fields therefore raised `IndexError` and aborted the run after the asmap database was loaded. Require all 12 fields so truncated lines are skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
makeseeds.pyexpects 12 fields in each DNS seeder line, but accepts lines with 11 fields and then reads the missing user agent. A truncated line with exactly 11 fields therefore raisesIndexErrorand aborts the run.Fix: Require all 12 fields so truncated lines are skipped. Add inline unit tests covering valid and truncated lines.
Fixes bitcoin#36146