The double negation syntax for options (-nofoo=0
) is confusing and doesn’t have any uses that make sense.
This PR disallows the double negation syntax for boolean type options which are marked with the ArgsManager::ALLOW_BOOL
flag. Please note, that non-boolean options (without the ArgsManager::ALLOW_BOOL
flag) cannot be negated at all after #16097.
With this PR:
0$ src/bitcoind -nolisten=0
1Error: Error parsing command line arguments: Double-negative -nolisten=0 is not allowed
NOTES for reviewers:
- this PR is based on top of #16097, so only the last three commits are to be reviewed here
- ref: 4d34fcc7138f0ffc831f0f8601c50cc7f494c197
- release notes for 0.6.0:
The
-nolisten
,-noupnp
and-nodnsseed
command-line options were renamed to-listen
,-upnp
and-dnsseed
, with a default value of1
. The old names are still supported for compatibility (so specifying-nolisten
is automatically interpreted as-listen=0
; every boolean argument can now be specified as either-foo
or-nofoo
).