Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-cli.cpp
Show All 31 Lines | |||||
static const bool DEFAULT_NAMED = false; | static const bool DEFAULT_NAMED = false; | ||||
static const int CONTINUE_EXECUTION = -1; | static const int CONTINUE_EXECUTION = -1; | ||||
static void SetupCliArgs() { | static void SetupCliArgs() { | ||||
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 = | |||||
CreateBaseChainParams(CBaseChainParams::REGTEST); | |||||
gArgs.AddArg("-?", "This help message", false, OptionsCategory::OPTIONS); | gArgs.AddArg("-?", "This help message", false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-version", "Print version and exit", false, | gArgs.AddArg("-version", "Print version and exit", false, | ||||
OptionsCategory::OPTIONS); | OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-conf=<file>", | gArgs.AddArg("-conf=<file>", | ||||
strprintf("Specify configuration file. Relative paths will be " | strprintf("Specify configuration file. Relative paths will be " | ||||
"prefixed by datadir location. (default: %s)", | "prefixed by datadir location. (default: %s)", | ||||
BITCOIN_CONF_FILENAME), | BITCOIN_CONF_FILENAME), | ||||
Show All 18 Lines | gArgs.AddArg( | ||||
"-rpcconnect=<ip>", | "-rpcconnect=<ip>", | ||||
strprintf("Send commands to node running on <ip> (default: %s)", | strprintf("Send commands to node running on <ip> (default: %s)", | ||||
DEFAULT_RPCCONNECT), | DEFAULT_RPCCONNECT), | ||||
false, OptionsCategory::OPTIONS); | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-rpccookiefile=<loc>", | gArgs.AddArg("-rpccookiefile=<loc>", | ||||
"Location of the auth cookie. Relative paths will be prefixed " | "Location of the auth cookie. Relative paths will be prefixed " | ||||
"by a net-specific datadir location. (default: data dir)", | "by a net-specific datadir location. (default: data dir)", | ||||
false, OptionsCategory::OPTIONS); | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg("-rpcport=<port>", | ||||
"-rpcport=<port>", | strprintf("Connect to JSON-RPC on <port> (default: %u, " | ||||
strprintf("Connect to JSON-RPC on <port> (default: %u or testnet: %u)", | "testnet: %u, regtest: %u)", | ||||
defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort()), | defaultBaseParams->RPCPort(), | ||||
testnetBaseParams->RPCPort(), | |||||
regtestBaseParams->RPCPort()), | |||||
false, OptionsCategory::OPTIONS); | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-rpcwait", "Wait for RPC server to start", false, | gArgs.AddArg("-rpcwait", "Wait for RPC server to start", false, | ||||
OptionsCategory::OPTIONS); | OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", false, | gArgs.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", false, | ||||
OptionsCategory::OPTIONS); | OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-rpcpassword=<pw>", "Password for JSON-RPC connections", | gArgs.AddArg("-rpcpassword=<pw>", "Password for JSON-RPC connections", | ||||
false, OptionsCategory::OPTIONS); | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-rpcclienttimeout=<n>", | gArgs.AddArg("-rpcclienttimeout=<n>", | ||||
strprintf("Timeout in seconds during HTTP requests, or 0 for " | strprintf("Timeout in seconds during HTTP requests, or 0 for " | ||||
▲ Show 20 Lines • Show All 570 Lines • Show Last 20 Lines |