MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / SetupServerArgs

Function SetupServerArgs

src/init.cpp:433–1592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433void SetupServerArgs(NodeContext &node) {
434 assert(!node.args);
435 node.args = &gArgs;
436 ArgsManager &argsman = *node.args;
437
438 SetupHelpOptions(argsman);
439 SetupCurrencyUnitOptions(argsman);
440 // server-only for now
441 argsman.AddArg("-help-debug",
442 "Print help message with debugging options and exit", false,
443 OptionsCategory::DEBUG_TEST);
444
445 init::AddLoggingArgs(argsman);
446
447 const auto defaultBaseParams = CreateBaseChainParams(ChainType::MAIN);
448 const auto testnetBaseParams = CreateBaseChainParams(ChainType::TESTNET);
449 const auto regtestBaseParams = CreateBaseChainParams(ChainType::REGTEST);
450 const auto defaultChainParams = CreateChainParams(argsman, ChainType::MAIN);
451 const auto testnetChainParams =
452 CreateChainParams(argsman, ChainType::TESTNET);
453 const auto regtestChainParams =
454 CreateChainParams(argsman, ChainType::REGTEST);
455
456 // Hidden Options
457 std::vector<std::string> hidden_args = {
458 "-dbcrashratio",
459 "-forcecompactdb",
460 "-maxaddrtosend",
461 "-parkdeepreorg",
462 "-automaticunparking",
463 "-replayprotectionactivationtime",
464 "-enableminerfund",
465 "-chronikallowpause",
466 "-chronikcors",
467 // GUI args. These will be overwritten by SetupUIArgs for the GUI
468 "-allowselfsignedrootcertificates",
469 "-choosedatadir",
470 "-lang=<lang>",
471 "-min",
472 "-resetguisettings",
473 "-rootcertificates=<file>",
474 "-splash",
475 "-uiplatform",
476 // TODO remove after the May 2026 upgrade
477 "-obolenskyactivationtime",
478 };
479
480 // Set all of the args and their help
481 // When adding new options to the categories, please keep and ensure
482 // alphabetical ordering. Do not translate _(...) -help-debug options, Many
483 // technical terms, and only a very small audience, so is unnecessary stress
484 // to translators.
485 argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY,
486 OptionsCategory::OPTIONS);
487#if defined(HAVE_SYSTEM)
488 argsman.AddArg(
489 "-alertnotify=<cmd>",
490 "Execute command when a relevant alert is received or we see "

Callers 3

AppInitFunction · 0.85
BasicTestingSetupMethod · 0.85
GuiMainFunction · 0.85

Calls 15

SetupHelpOptionsFunction · 0.85
SetupCurrencyUnitOptionsFunction · 0.85
AddLoggingArgsFunction · 0.85
CreateBaseChainParamsFunction · 0.85
CreateChainParamsFunction · 0.85
GetNumCoresFunction · 0.85
JoinFunction · 0.85
GetNetworkNamesFunction · 0.85
FormatMoneyFunction · 0.85
AddArgMethod · 0.80
ChronikPortMethod · 0.80

Tested by 1

BasicTestingSetupMethod · 0.68