mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-29 15:29:14 +01:00
a85e8c0e61doc: Add some general documentation about negated options (Ryan Ofsky)490c8fa178doc: Add release notes summarizing negated option behavior changes. (Ryan Ofsky)458ef0a11brefactor: Avoid using IsArgSet() on -connect list option (Ryan Ofsky)752ab9c3c6test: Add test to make sure -noconnect disables -dnsseed and -listen by default (Ryan Ofsky)3c2920ec98refactor: Avoid using IsArgSet() on -signetseednode and -signetchallenge list options (Ryan Ofsky)d05668922arefactor: Avoid using IsArgSet() on -debug, -loglevel, and -vbparams list options (Ryan Ofsky)3d1e8ca53aNormalize inconsistent -noexternalip behavior (Ryan Ofsky)ecd590d4c1Normalize inconsistent -noonlynet behavior (Ryan Ofsky)5544a19f86Fix nonsensical bitcoin-cli -norpcwallet behavior (Ryan Ofsky)6e8e7f433fFix nonsensical -noasmap behavior (Ryan Ofsky)b6ab350806Fix nonsensical -notest behavior (Ryan Ofsky)6768389917Fix nonsensical -norpcwhitelist behavior (Ryan Ofsky)e03409c70fFix nonsensical -norpcbind and -norpcallowip behavior (Ryan Ofsky)40c4899bc2Fix nonsensical -nobind and -nowhitebind behavior (Ryan Ofsky)5453e66fd9Fix nonsensical -noseednode behavior (Ryan Ofsky) Pull request description: The PR changes behavior of negated `-noseednode`, `-nobind`, `-nowhitebind`, `-norpcbind`, `-norpcallowip`, `-norpcwhitelist`, `-notest`, `-noasmap`, `-norpcwallet`, `-noonlynet`, and `-noexternalip` options, so negating these options just clears previously specified values doesn't have other side effects. Negating options on the command line can be a useful way of resetting options that may have been set earlier in the command line or config file. But before this change, negating these options wouldn't fully reset them, and would have confusing and undocumented side effects (see commit descriptions for details). Now, negating these options just resets them and behaves the same as not specifying them. Motivation for this PR is to fix confusing behaviors and also to remove incorrect usages of the `IsArgSet()` function. Using `IsArgSet()` tends to lead to negated option bugs in general, but it especially causes bugs when used with list settings returned by `GetArgs()`, because when these settings are negated, `IsArgSet()` will return true but `GetArgs()` will return an empty list. This PR eliminates all uses of `IsArgSet()` and `GetArgs()` together, and followup PR #17783 makes it an error to use `IsArgSet()` on list settings, since calling `IsArgSet()` is never actually necessary. Most of the changes here were originally made in #17783 and then moved here to be easier to review and avoid a dependency on #16545. ACKs for top commit: achow101: ACKa85e8c0e61danielabrozzoni: re-ACKa85e8c0e61hodlinator: re-ACKa85e8c0e61Tree-SHA512: dd4b19faac923aeaa647b1c241d929609ce8242b43e3b7bc32523cc48ec92a83ac0dc5aee79f1eba8794535e0314b96cb151fd04ac973671a1ebb9b52dd16697