Repository navigation
contrib: Bugfix for checking bad dns seeds without casting in makeseeds.py - #26681
Merged
Merged
Conversation
Since seed lines comes with 'str' type, comparing it directly with 0
('int' type) in the if statement was not working at all. This is fixed
by casting 'int' type to the values in the 'good' column of seeds text file.
Lines that starts with comment in the seeds text file are now ignored.
If statement for checking bad seeds are moved to the top of the 'parseline'
function as if seed is bad, there is no point of going forward from there.
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
Contributor
Author
|
If we still want to see the number of total seeds on the terminal, we can simply print "lines length -1 (comment for the column names)". And it could look like that: |
mzumsande
reviewed
Dec 11, 2022
makeseeds.py
Member
|
ACK 3cc989d |
jonatack
reviewed
Apr 19, 2023
jonatack
reviewed
Apr 19, 2023
jonatack
approved these changes
Apr 19, 2023
makeseeds.pymakeseeds.py
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
strtype, comparinggoodcolumn directly with 0 (inttype) in the if statement was not working at all. This is fixed by castinginttype to the values in thegoodcolumn of seeds text file.parselinefunction as if a seed is bad; there is no point of going forward from there.Since this bug-fix eliminates bad seeds over 550k in the first place, in my case; particular job for parsing all seeds speed is up by 600% and whole script's speed is up by %30.
Note that stats in the terminal are not going to include bad seeds after this fix, which would be the same if this bug were never there before.