Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Lines | |||||
static void OnRPCStopped() { | static void OnRPCStopped() { | ||||
rpc_notify_block_change_connection.disconnect(); | rpc_notify_block_change_connection.disconnect(); | ||||
RPCNotifyBlockChange(false, nullptr); | RPCNotifyBlockChange(false, nullptr); | ||||
g_best_block_cv.notify_all(); | g_best_block_cv.notify_all(); | ||||
LogPrint(BCLog::RPC, "RPC stopped.\n"); | LogPrint(BCLog::RPC, "RPC stopped.\n"); | ||||
} | } | ||||
void SetupServerArgs() { | void SetupServerArgs() { | ||||
SetupHelpOptions(gArgs); | |||||
// server-only for now | |||||
gArgs.AddArg("-help-debug", | |||||
"Print help message with debugging options and exit", false, | |||||
OptionsCategory::DEBUG_TEST); | |||||
const auto defaultBaseParams = | const auto defaultBaseParams = | ||||
CreateBaseChainParams(CBaseChainParams::MAIN); | CreateBaseChainParams(CBaseChainParams::MAIN); | ||||
const auto testnetBaseParams = | const auto testnetBaseParams = | ||||
CreateBaseChainParams(CBaseChainParams::TESTNET); | CreateBaseChainParams(CBaseChainParams::TESTNET); | ||||
const auto regtestBaseParams = | const auto regtestBaseParams = | ||||
CreateBaseChainParams(CBaseChainParams::REGTEST); | CreateBaseChainParams(CBaseChainParams::REGTEST); | ||||
const auto defaultChainParams = CreateChainParams(CBaseChainParams::MAIN); | const auto defaultChainParams = CreateChainParams(CBaseChainParams::MAIN); | ||||
const auto testnetChainParams = | const auto testnetChainParams = | ||||
CreateChainParams(CBaseChainParams::TESTNET); | CreateChainParams(CBaseChainParams::TESTNET); | ||||
const auto regtestChainParams = | const auto regtestChainParams = | ||||
CreateChainParams(CBaseChainParams::REGTEST); | CreateChainParams(CBaseChainParams::REGTEST); | ||||
// Hidden Options | // Hidden Options | ||||
std::vector<std::string> hidden_args = { | std::vector<std::string> hidden_args = { | ||||
"-h", "-help", "-dbcrashratio", "-forcecompactdb", "-parkdeepreorg", | "-dbcrashratio", "-forcecompactdb", "-parkdeepreorg", | ||||
"-automaticunparking", "-replayprotectionactivationtime", | "-automaticunparking", "-replayprotectionactivationtime", | ||||
"-enableminerfund", | "-enableminerfund", | ||||
// GUI args. These will be overwritten by SetupUIArgs for the GUI | // GUI args. These will be overwritten by SetupUIArgs for the GUI | ||||
"-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", | "-allowselfsignedrootcertificates", "-choosedatadir", "-lang=<lang>", | ||||
"-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", | "-min", "-resetguisettings", "-rootcertificates=<file>", "-splash", | ||||
"-uiplatform", | "-uiplatform", | ||||
// TODO remove after the November 2020 upgrade | // TODO remove after the November 2020 upgrade | ||||
"-axionactivationtime"}; | "-axionactivationtime"}; | ||||
// Set all of the args and their help | // Set all of the args and their help | ||||
// When adding new options to the categories, please keep and ensure | // When adding new options to the categories, please keep and ensure | ||||
// alphabetical ordering. Do not translate _(...) -help-debug options, Many | // alphabetical ordering. Do not translate _(...) -help-debug options, Many | ||||
// technical terms, and only a very small audience, so is unnecessary stress | // technical terms, and only a very small audience, so is unnecessary stress | ||||
// to translators. | // to translators. | ||||
gArgs.AddArg("-?", "Print this help message and exit", | |||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | |||||
gArgs.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, | gArgs.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, | ||||
OptionsCategory::OPTIONS); | OptionsCategory::OPTIONS); | ||||
#if defined(HAVE_SYSTEM) | #if defined(HAVE_SYSTEM) | ||||
gArgs.AddArg("-alertnotify=<cmd>", | gArgs.AddArg("-alertnotify=<cmd>", | ||||
"Execute command when a relevant alert is received or we see " | "Execute command when a relevant alert is received or we see " | ||||
"a really long fork (%s in cmd is replaced by message)", | "a really long fork (%s in cmd is replaced by message)", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 497 Lines • ▼ Show 20 Lines | gArgs.AddArg("-debug=<category>", | ||||
ListLogCategories() + ".", | ListLogCategories() + ".", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-debugexclude=<category>", | "-debugexclude=<category>", | ||||
strprintf("Exclude debugging information for a category. Can be used " | strprintf("Exclude debugging information for a category. Can be used " | ||||
"in conjunction with -debug=1 to output debug logs for all " | "in conjunction with -debug=1 to output debug logs for all " | ||||
"categories except one or more specified categories."), | "categories except one or more specified categories."), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-help-debug", | |||||
"Print help message with debugging options and exit", | |||||
ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | |||||
gArgs.AddArg("-logips", | gArgs.AddArg("-logips", | ||||
strprintf("Include IP addresses in debug output (default: %d)", | strprintf("Include IP addresses in debug output (default: %d)", | ||||
DEFAULT_LOGIPS), | DEFAULT_LOGIPS), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-logtimestamps", | gArgs.AddArg("-logtimestamps", | ||||
strprintf("Prepend debug output with timestamp (default: %d)", | strprintf("Prepend debug output with timestamp (default: %d)", | ||||
DEFAULT_LOGTIMESTAMPS), | DEFAULT_LOGTIMESTAMPS), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); | ||||
▲ Show 20 Lines • Show All 1,874 Lines • Show Last 20 Lines |