Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-wallet.cpp
Show All 15 Lines | |||||
#include <cstdio> | #include <cstdio> | ||||
const std::function<std::string(const char *)> G_TRANSLATION_FUN = nullptr; | const std::function<std::string(const char *)> G_TRANSLATION_FUN = nullptr; | ||||
static void SetupWalletToolArgs() { | static void SetupWalletToolArgs() { | ||||
SetupChainParamsBaseOptions(); | SetupChainParamsBaseOptions(); | ||||
gArgs.AddArg("-?", "This help message", false, OptionsCategory::OPTIONS); | gArgs.AddArg("-?", "This help message", ArgsManager::ALLOW_ANY, false, | ||||
gArgs.AddArg("-datadir=<dir>", "Specify data directory", false, | |||||
OptionsCategory::OPTIONS); | |||||
gArgs.AddArg("-wallet=<wallet-name>", "Specify wallet name", false, | |||||
OptionsCategory::OPTIONS); | OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-datadir=<dir>", "Specify data directory", | |||||
ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | |||||
gArgs.AddArg("-wallet=<wallet-name>", "Specify wallet name", | |||||
ArgsManager::ALLOW_ANY, false, OptionsCategory::OPTIONS); | |||||
gArgs.AddArg("-debug=<category>", | gArgs.AddArg("-debug=<category>", | ||||
"Output debugging information (default: 0).", false, | "Output debugging information (default: 0).", | ||||
OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-printtoconsole", | gArgs.AddArg("-printtoconsole", | ||||
"Send trace/debug info to console (default: 1 when no -debug " | "Send trace/debug info to console (default: 1 when no -debug " | ||||
"is true, 0 otherwise.", | "is true, 0 otherwise.", | ||||
false, OptionsCategory::DEBUG_TEST); | ArgsManager::ALLOW_ANY, false, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("info", "Get wallet info", false, OptionsCategory::COMMANDS); | gArgs.AddArg("info", "Get wallet info", ArgsManager::ALLOW_ANY, false, | ||||
gArgs.AddArg("create", "Create new wallet file", false, | |||||
OptionsCategory::COMMANDS); | OptionsCategory::COMMANDS); | ||||
gArgs.AddArg("create", "Create new wallet file", ArgsManager::ALLOW_ANY, | |||||
false, OptionsCategory::COMMANDS); | |||||
// Hidden | // Hidden | ||||
gArgs.AddArg("-h", "", false, OptionsCategory::HIDDEN); | gArgs.AddArg("-h", "", ArgsManager::ALLOW_ANY, false, | ||||
gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN); | OptionsCategory::HIDDEN); | ||||
gArgs.AddArg("-help", "", ArgsManager::ALLOW_ANY, false, | |||||
OptionsCategory::HIDDEN); | |||||
} | } | ||||
static bool WalletAppInit(int argc, char *argv[]) { | static bool WalletAppInit(int argc, char *argv[]) { | ||||
SetupWalletToolArgs(); | SetupWalletToolArgs(); | ||||
std::string error_message; | std::string error_message; | ||||
if (!gArgs.ParseParameters(argc, argv, error_message)) { | if (!gArgs.ParseParameters(argc, argv, error_message)) { | ||||
fprintf(stderr, "Error parsing command line arguments: %s\n", | fprintf(stderr, "Error parsing command line arguments: %s\n", | ||||
error_message.c_str()); | error_message.c_str()); | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |