forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nonsensical -norpcwhitelist, -norpcallowip and related behavior
This change fixes some corner cases handling negated list options: -norpcwhitelist, -norpcallowip, -norpcbind, -nobind, -nowhitebind, -noconnect, -noexternalip, -noonlynet, and -nosignetchalleng. Negating these options is now the same as not specifying them at all. This is useful for being able to override config file options on the command line without seeing parameter interaction side effects from the otherwise ignored config options. The code change here is just avoid calling the IsArgSet() function on ALLOW_LIST options, and to disallow such calls in the future. Code that uses IsArgSet() with list options is confusing and leads to mistakes due to the easy to overlook case where an argument is negated and IsArgSet() returns true, but GetArgs() returns an empty list. This change includes release notes, but the release notes don't go into details about specific options. For reference this change: - Treats specifying -norpcwhitelist exactly the same as not specifying any -rpcwhitelist, instead of behaving almost the same but flipping the default -rpcwhitelistdefault value. - Treats specifying -norpcallowip and -norpcbind exactly the same as not specifying -rpcallowip or -rpcbind, instead of failing to bind to localhost and failing to show warnings when one value is set without the other. - Treats specifying -nobind, -nowhitebind, and -noconnect exactly the same as not specifying -bind, -whitebind, or -connect values instead of treating them almost the same but causing parameter interactions with -dnsseed, -listen, and m_use_addrman_outgoing values. - Treats specifying -noexternalip exactly the same as not specifying any -externalip, instead of treating it almost the same but interacting with the -discover value. - Treats specifying -noonlynet exactly the same as not specifying -onlynet instead of marking all networks unreachable. - Treats specifying -nosignetchallenge exactly the same as not specifying -signetchallenge instead of throwing strange error "-signetchallenge cannot be multiple values" - Clarifies -vbparams and -debug handling code and fixes misleading comments without changing behavior.
- Loading branch information
Showing
7 changed files
with
55 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Configuration | ||
------------- | ||
|
||
Some corner cases handling negated list options `-norpcallowip`, `-norpcbind`, `-nobind`, `-nowhitebind`, `-noconnect`, `-noexternalip`, `-noonlynet`, `-nosignetchallenge` have been fixed. Now negating these options is the same as not specifying them at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters