| 431 | } |
| 432 | |
| 433 | void 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 " |