Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 437 Lines • ▼ Show 20 Lines | argsman.AddArg( | ||||
"verify all, default: %s, testnet: %s)", | "verify all, default: %s, testnet: %s)", | ||||
defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), | defaultChainParams->GetConsensus().defaultAssumeValid.GetHex(), | ||||
testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), | testnetChainParams->GetConsensus().defaultAssumeValid.GetHex()), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
argsman.AddArg("-blocksdir=<dir>", | argsman.AddArg("-blocksdir=<dir>", | ||||
"Specify directory to hold blocks subdirectory for *.dat " | "Specify directory to hold blocks subdirectory for *.dat " | ||||
"files (default: <datadir>)", | "files (default: <datadir>)", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
argsman.AddArg("-fastprune", | |||||
"Use smaller block files and lower minimum prune height for " | |||||
"testing purposes", | |||||
ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, | |||||
OptionsCategory::DEBUG_TEST); | |||||
#if defined(HAVE_SYSTEM) | #if defined(HAVE_SYSTEM) | ||||
argsman.AddArg("-blocknotify=<cmd>", | argsman.AddArg("-blocknotify=<cmd>", | ||||
"Execute command when the best block changes (%s in cmd is " | "Execute command when the best block changes (%s in cmd is " | ||||
"replaced by block hash)", | "replaced by block hash)", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
#endif | #endif | ||||
argsman.AddArg("-blockreconstructionextratxn=<n>", | argsman.AddArg("-blockreconstructionextratxn=<n>", | ||||
strprintf("Extra transactions to keep in memory for compact " | strprintf("Extra transactions to keep in memory for compact " | ||||
▲ Show 20 Lines • Show All 1,446 Lines • ▼ Show 20 Lines | if (gArgs.GetBoolArg("-peerblockfilters", DEFAULT_PEERBLOCKFILTERS)) { | ||||
nLocalServices = ServiceFlags(nLocalServices | NODE_COMPACT_FILTERS); | nLocalServices = ServiceFlags(nLocalServices | NODE_COMPACT_FILTERS); | ||||
} | } | ||||
// if using block pruning, then disallow txindex | // if using block pruning, then disallow txindex | ||||
if (args.GetArg("-prune", 0)) { | if (args.GetArg("-prune", 0)) { | ||||
if (args.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { | if (args.GetBoolArg("-txindex", DEFAULT_TXINDEX)) { | ||||
return InitError(_("Prune mode is incompatible with -txindex.")); | return InitError(_("Prune mode is incompatible with -txindex.")); | ||||
} | } | ||||
if (!g_enabled_filter_types.empty()) { | |||||
return InitError( | |||||
_("Prune mode is incompatible with -blockfilterindex.")); | |||||
} | |||||
} | } | ||||
// -bind and -whitebind can't be set when not listening | // -bind and -whitebind can't be set when not listening | ||||
size_t nUserBind = | size_t nUserBind = | ||||
args.GetArgs("-bind").size() + args.GetArgs("-whitebind").size(); | args.GetArgs("-bind").size() + args.GetArgs("-whitebind").size(); | ||||
if (nUserBind != 0 && !args.GetBoolArg("-listen", DEFAULT_LISTEN)) { | if (nUserBind != 0 && !args.GetBoolArg("-listen", DEFAULT_LISTEN)) { | ||||
return InitError(Untranslated( | return InitError(Untranslated( | ||||
"Cannot set -bind or -whitebind together with -listen=0")); | "Cannot set -bind or -whitebind together with -listen=0")); | ||||
▲ Show 20 Lines • Show All 1,273 Lines • Show Last 20 Lines |