Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 330 Lines • ▼ Show 20 Lines | static void OnRPCStopped() { | ||||
LogPrint(BCLog::RPC, "RPC stopped.\n"); | LogPrint(BCLog::RPC, "RPC stopped.\n"); | ||||
} | } | ||||
void SetupServerArgs() { | void SetupServerArgs() { | ||||
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); | |||||
const auto defaultChainParams = CreateChainParams(CBaseChainParams::MAIN); | const auto defaultChainParams = CreateChainParams(CBaseChainParams::MAIN); | ||||
const auto testnetChainParams = | const auto testnetChainParams = | ||||
CreateChainParams(CBaseChainParams::TESTNET); | CreateChainParams(CBaseChainParams::TESTNET); | ||||
const auto regtestChainParams = | |||||
CreateChainParams(CBaseChainParams::REGTEST); | |||||
// Hidden Options | // Hidden Options | ||||
std::vector<std::string> hidden_args = { | std::vector<std::string> hidden_args = { | ||||
"-rpcssl", "-benchmark", "-h", "-help", "-socks", "-tor", "-debugnet", | "-rpcssl", "-benchmark", "-h", "-help", "-socks", "-tor", "-debugnet", | ||||
"-whitelistalwaysrelay", "-blockminsize", "-dbcrashratio", | "-whitelistalwaysrelay", "-blockminsize", "-dbcrashratio", | ||||
"-forcecompactdb", "-usehd", "-parkdeepreorg", "-automaticunparking", | "-forcecompactdb", "-usehd", "-parkdeepreorg", "-automaticunparking", | ||||
"-replayprotectionactivationtime", "-enableminerfund", | "-replayprotectionactivationtime", "-enableminerfund", | ||||
// GUI args. These will be overwritten by SetupUIArgs for the GUI | // GUI args. These will be overwritten by SetupUIArgs for the GUI | ||||
▲ Show 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | gArgs.AddArg("-peerbloomfilters", | ||||
strprintf("Support filtering of blocks and transaction with " | strprintf("Support filtering of blocks and transaction with " | ||||
"bloom filters (default: %d)", | "bloom filters (default: %d)", | ||||
DEFAULT_PEERBLOOMFILTERS), | DEFAULT_PEERBLOOMFILTERS), | ||||
false, OptionsCategory::CONNECTION); | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-permitbaremultisig", | gArgs.AddArg("-permitbaremultisig", | ||||
strprintf("Relay non-P2SH multisig (default: %d)", | strprintf("Relay non-P2SH multisig (default: %d)", | ||||
DEFAULT_PERMIT_BAREMULTISIG), | DEFAULT_PERMIT_BAREMULTISIG), | ||||
false, OptionsCategory::CONNECTION); | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg( | gArgs.AddArg("-port=<port>", | ||||
"-port=<port>", | strprintf("Listen for connections on <port> (default: %u, " | ||||
strprintf( | "testnet: %u, regtest: %u)", | ||||
"Listen for connections on <port> (default: %u or testnet: %u)", | |||||
defaultChainParams->GetDefaultPort(), | defaultChainParams->GetDefaultPort(), | ||||
testnetChainParams->GetDefaultPort()), | testnetChainParams->GetDefaultPort(), | ||||
regtestChainParams->GetDefaultPort()), | |||||
false, OptionsCategory::CONNECTION); | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"), false, | gArgs.AddArg("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"), false, | ||||
OptionsCategory::CONNECTION); | OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-proxyrandomize", | gArgs.AddArg("-proxyrandomize", | ||||
strprintf("Randomize credentials for every proxy connection. " | strprintf("Randomize credentials for every proxy connection. " | ||||
"This enables Tor stream isolation (default: %d)", | "This enables Tor stream isolation (default: %d)", | ||||
DEFAULT_PROXYRANDOMIZE), | DEFAULT_PROXYRANDOMIZE), | ||||
false, OptionsCategory::CONNECTION); | false, OptionsCategory::CONNECTION); | ||||
gArgs.AddArg("-seednode=<ip>", | gArgs.AddArg("-seednode=<ip>", | ||||
▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | gArgs.AddArg( | ||||
"level 1 verifies block validity, " | "level 1 verifies block validity, " | ||||
"level 2 verifies undo data, " | "level 2 verifies undo data, " | ||||
"level 3 checks disconnection of tip blocks, " | "level 3 checks disconnection of tip blocks, " | ||||
"and level 4 tries to reconnect the blocks. " | "and level 4 tries to reconnect the blocks. " | ||||
"Each level includes the checks of the previous levels " | "Each level includes the checks of the previous levels " | ||||
"(0-4, default: %u)", | "(0-4, default: %u)", | ||||
DEFAULT_CHECKLEVEL), | DEFAULT_CHECKLEVEL), | ||||
true, OptionsCategory::DEBUG_TEST); | true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-checkblockindex", | gArgs.AddArg( | ||||
"-checkblockindex", | |||||
strprintf("Do a full consistency check for mapBlockIndex, " | strprintf("Do a full consistency check for mapBlockIndex, " | ||||
"setBlockIndexCandidates, ::ChainActive() and " | "setBlockIndexCandidates, ::ChainActive() and " | ||||
"mapBlocksUnlinked occasionally. (default: %u)", | "mapBlocksUnlinked occasionally. (default: %u, regtest: %u)", | ||||
defaultChainParams->DefaultConsistencyChecks()), | defaultChainParams->DefaultConsistencyChecks(), | ||||
regtestChainParams->DefaultConsistencyChecks()), | |||||
true, OptionsCategory::DEBUG_TEST); | true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-checkmempool=<n>", | gArgs.AddArg( | ||||
strprintf("Run checks every <n> transactions (default: %u)", | "-checkmempool=<n>", | ||||
defaultChainParams->DefaultConsistencyChecks()), | strprintf( | ||||
"Run checks every <n> transactions (default: %u, regtest: %u)", | |||||
defaultChainParams->DefaultConsistencyChecks(), | |||||
regtestChainParams->DefaultConsistencyChecks()), | |||||
true, OptionsCategory::DEBUG_TEST); | true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-checkpoints", | gArgs.AddArg("-checkpoints", | ||||
strprintf("Only accept block chain matching built-in " | strprintf("Only accept block chain matching built-in " | ||||
"checkpoints (default: %d)", | "checkpoints (default: %d)", | ||||
DEFAULT_CHECKPOINTS_ENABLED), | DEFAULT_CHECKPOINTS_ENABLED), | ||||
true, OptionsCategory::DEBUG_TEST); | true, OptionsCategory::DEBUG_TEST); | ||||
gArgs.AddArg("-deprecatedrpc=<method>", | gArgs.AddArg("-deprecatedrpc=<method>", | ||||
"Allows deprecated RPC method(s) to be used", true, | "Allows deprecated RPC method(s) to be used", true, | ||||
OptionsCategory::DEBUG_TEST); | OptionsCategory::DEBUG_TEST); | ||||
▲ Show 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | gArgs.AddArg( | ||||
"Username and hashed password for JSON-RPC connections. The field " | "Username and hashed password for JSON-RPC connections. The field " | ||||
"<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical " | "<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical " | ||||
"python script is included in share/rpcuser. The client then connects " | "python script is included in share/rpcuser. The client then connects " | ||||
"normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of " | "normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of " | ||||
"arguments. This option can be specified multiple times", | "arguments. This option can be specified multiple times", | ||||
false, OptionsCategory::RPC); | false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcport=<port>", | gArgs.AddArg("-rpcport=<port>", | ||||
strprintf("Listen for JSON-RPC connections on <port> " | strprintf("Listen for JSON-RPC connections on <port> " | ||||
"(default: %u or testnet: %u)", | "(default: %u, testnet: %u, regtest: %u)", | ||||
defaultBaseParams->RPCPort(), | defaultBaseParams->RPCPort(), | ||||
testnetBaseParams->RPCPort()), | testnetBaseParams->RPCPort(), | ||||
regtestBaseParams->RPCPort()), | |||||
false, OptionsCategory::RPC); | false, OptionsCategory::RPC); | ||||
gArgs.AddArg("-rpcallowip=<ip>", | gArgs.AddArg("-rpcallowip=<ip>", | ||||
"Allow JSON-RPC connections from specified source. Valid for " | "Allow JSON-RPC connections from specified source. Valid for " | ||||
"<ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. " | "<ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. " | ||||
"1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). " | "1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). " | ||||
"This option can be specified multiple times", | "This option can be specified multiple times", | ||||
false, OptionsCategory::RPC); | false, OptionsCategory::RPC); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
▲ Show 20 Lines • Show All 1,544 Lines • Show Last 20 Lines |