-
Notifications
You must be signed in to change notification settings - Fork 38.7k
doc: fixup help output for -upnp and -natpmp #28874
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
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. 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. |
src/init.cpp
Outdated
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.
| argsman.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %s)", DEFAULT_UPNP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); | |
| argsman.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %s)", !Assert(!DEFAULT_UPNP)), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION); |
Otherwise it would be incorrect (missing "when listening and no -proxy") if DEFAULT_UPNP flips to true.
Alternatively, just remove the SoftSetArg stuff...
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.
if DEFAULT_UPNP flips to true.
I very much doubt we would ever return to shipping upnp/natpmp on by default.
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.
Hence why it might make more sense to just remove the SoftSetArg stuff that gives it a conditional default in that case
src/init.cpp
Outdated
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.
%s will make DEFAULT_NATPMP "false" here instead of "0", I think...
This always defaults to false, since we removed the compile time options to set it otherwise.
372cd23 to
92f88a9
Compare
|
ACK 92f88a9 Configured $ bitcoind --help
[...]
-natpmp
Use NAT-PMP to map the listening port (default: 0)
[...]
-upnp
Use UPnP to map the listening port (default: 0)Verified that modifying |
hernanmarino
left a comment
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.
ACK 92f88a9
This is a very belated followup to #26896 (which removed the configure options for setting the upnp and natpmp runtime default) and corrects the
-helpdocs for-upnpand-natpmp.