-
Notifications
You must be signed in to change notification settings - Fork 21.6k
cmd/utils: fix disabling discovery through config file #33279
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
Conversation
|
Maybe should fix the overriding? |
What behavior is expected? I ignore the config in config file for compatible with old --flags. if we change the flags behavior may caused some issue when upgrade to new version. |
|
How about change to this. I consider it as my first version. But when user upgrade it may caused some issue. if both config file and cli flag is not set. |
83fe18c to
b9b9779
Compare
Got it. just change the default value in nodes/defaults.go to true, so even user configure neither config file or cli flags still get true. |
b9b9779 to
a8cfd72
Compare
a8cfd72 to
d15d1ee
Compare
No matter what value of P2P.DiscoveryV4 or DiscoveryV5 is set in config file, it will be overwritten by the CLI flag, even if the flag is not set. This fixes it to apply the flag only if set.
No matter what value of these two flag is set in config file, it will be overwriten in cli flag. See below:
go-ethereum/cmd/utils/flags.go
Lines 1371 to 1372 in f8e5b53