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.
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
node: drop support for static & trusted node list files #25610
node: drop support for static & trusted node list files #25610
Changes from 5 commits
88faf1a
964f98a
d27f844
954a1ee
f6244e6
a7cc4e6
7568922
f4ae67d
5b00125
7c5b80c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, what's the point of using
warnOnce
?config.Logger
, which is:// Logger is a custom logger to use with the p2p.Server
. I don't see why we need to use that one here.w
to decide if it has already warned, in your case&c.staticNodesWarning
. But is there practically any actual risk of that happening multiple times?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checkLegacyFiles is only called from here:
So I don't see how that could happen multiple times, so you can just skip that whole dance with
&c.staticNodesWarning
. I think.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and thus also remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
c.Logger
is good style. All p2p / node code uses the logger passed via config. It's useful in unit tests.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this seems like a micro-customization. Is it that big of a deal if this method always does WARN instead of ERR ?
I can live with the way it is though, just think it'd be cleaner to leave it be