-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Fix argument parsing oddity with -noX #6284
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
7d9e0ef
to
d3ff291
Compare
Hmm somehow the tests also check the old behavior. I don't understand. It seems very counter-intuitive. Updated the tests, although this may make the change more controversial. |
I also don't understand the reasoning behind the old semantics. |
Current behaviour in latest master
After applying this pull
|
@fanquake Proxy is not a boolean option, although I agree that these |
I suspect the reasoning for this, was that -noX is meant to be deprecated, while -X=0 is the new form. I don't really care either way about changing it, though... |
What makes you think that? |
Behavior change needs a mention in |
`bitcoind -X -noX` ends up, unintuitively, with `X` set. (for all boolean options X) This result is due to the odd two-pass processing of arguments. This patch fixes this oddity and simplifies the code at the same time.
d3ff291
to
c6455c7
Compare
Misc upstream PRs Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6077 - Second commit only (first was already applied to 0.11.X and then reverted) - bitcoin/bitcoin#6284 - bitcoin/bitcoin#6489 - bitcoin/bitcoin#6462 - bitcoin/bitcoin#6647 - bitcoin/bitcoin#6235 - bitcoin/bitcoin#6905 - bitcoin/bitcoin#6780 - Excluding second commit (QT) and third commit (requires bitcoin/bitcoin#6993) - bitcoin/bitcoin#6961 - Excluding QT parts, and a small `src/policy/policy.cpp` change which depends on a bunch of other PRs, which we'll have to remember to come back to. - bitcoin/bitcoin#7044 - bitcoin/bitcoin#8856 - bitcoin/bitcoin#9002 Part of #2074 and #2132.
Misc upstream PRs Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6077 - Second commit only (first was already applied to 0.11.X and then reverted) - bitcoin/bitcoin#6284 - bitcoin/bitcoin#6489 - bitcoin/bitcoin#6235 - bitcoin/bitcoin#6905 - bitcoin/bitcoin#6780 - Excluding second commit (QT) and third commit (requires bitcoin/bitcoin#6993) - bitcoin/bitcoin#6961 - Excluding QT parts, and a small `src/policy/policy.cpp` change which depends on a bunch of other PRs, which we'll have to remember to come back to. - bitcoin/bitcoin#7044 - bitcoin/bitcoin#8856 - bitcoin/bitcoin#9002 Part of #2074 and #2132.
bitcoind -X -noX
ends up, unintuitively, withX
set.(for all boolean options X)
This result is due to the odd two-pass processing of arguments. This patch fixes this oddity (by always taking the latter option setting) and simplifies the code at the same time.
Discovered while testing #6272.