aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2018-04-28 19:40:51 -0400
committerAndrew Chow <achow101-github@achow101.com>2018-05-30 11:27:50 -0400
commit4f8704d57f8fb2958a43534779b20201b77eecae (patch)
tree4ccb64e2e65e99726786919d6d0feecde2e26377 /src/init.cpp
parent174f7c80801383cde5ea514b19fb8b108b56b31c (diff)
Give an error and exit if there are unknown parameters
If an unknown option is given via either the command line args or the conf file, throw an error and exit Update tests for ArgsManager knowing args Ignore unknown options in the config file for bitcoin-cli Fix tests and bitcoin-cli to match actual options used
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 882371946c..b4e2eec0d2 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -499,6 +499,23 @@ void SetupServerArgs()
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", false, OptionsCategory::RPC);
gArgs.AddArg("-rpcworkqueue=<n>", strprintf("Set the depth of the work queue to service RPC calls (default: %d)", DEFAULT_HTTP_WORKQUEUE), true, OptionsCategory::RPC);
gArgs.AddArg("-server", "Accept command line and JSON-RPC commands", false, OptionsCategory::RPC);
+
+ // Hidden options
+ gArgs.AddArg("-rpcssl", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-benchmark", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-h", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-socks", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-tor", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-debugnet", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-whitelistalwaysrelay", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-prematurewitness", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-walletprematurewitness", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-promiscuousmempoolflags", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-blockminsize", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-dbcrashratio", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-forcecompactdb", "", false, OptionsCategory::HIDDEN);
+ gArgs.AddArg("-usehd", "", false, OptionsCategory::HIDDEN);
}
std::string LicenseInfo()