This PR drops all calls to ArgsManager::IsArgSet()
on list arguments that are retrieved with ArgsManager::GetArgs()
.
Most of these calls are buggy because they cause negated lists to be treated differently than empty lists, leading to a variety of nonsensical behaviors for -norpcwhitelist
, -norpcallowip
, -norpcbind
, -nobind
, -nowhitebind
, -noexternalip
, -noonlynet
, -noseednode
, -nosignetchallenge
, -nosignetseednode
, -notest
, and -norpcwallet
options which are described in detail in commit messages. The remaining calls which are not buggy are redundant, and are removed here with no changes in behavior.
The first 3 commits just clean up code without changing behavior: adding tests and documentation and making checks for negated options explicit.
The last 2 commits change handling of negated options to avoid nonsensical behavior.
These changes were originally part of #17783, which adds enforcement that IsArgSet()
cannot be called on list options, so similar problems do not happen in the future. But progress on #17783 was slower than expected, so it seems good to improve current behavior and documentation while stricter checking is being worked on in #17783.