Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 423 Lines • ▼ Show 20 Lines | gArgs.AddArg("-blocknotify=<cmd>", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-blockreconstructionextratxn=<n>", | gArgs.AddArg("-blockreconstructionextratxn=<n>", | ||||
strprintf("Extra transactions to keep in memory for compact " | strprintf("Extra transactions to keep in memory for compact " | ||||
"block reconstructions (default: %u)", | "block reconstructions (default: %u)", | ||||
DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), | DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-blocksonly", | "-blocksonly", | ||||
strprintf("Whether to operate in a blocks only mode (default: %d)", | strprintf( | ||||
"Whether to reject transactions from network peers. Transactions " | |||||
"from the wallet or RPC are not affected. (default: %u)", | |||||
DEFAULT_BLOCKSONLY), | DEFAULT_BLOCKSONLY), | ||||
ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, | ArgsManager::ALLOW_ANY, 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), | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg("-datadir=<dir>", "Specify data directory", | gArgs.AddArg("-datadir=<dir>", "Specify data directory", | ||||
ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
▲ Show 20 Lines • Show All 1,838 Lines • ▼ Show 20 Lines | if (onionArg != "") { | ||||
SetProxy(NET_ONION, addrOnion); | SetProxy(NET_ONION, addrOnion); | ||||
SetReachable(NET_ONION, true); | SetReachable(NET_ONION, true); | ||||
} | } | ||||
} | } | ||||
// see Step 2: parameter interactions for more information about these | // see Step 2: parameter interactions for more information about these | ||||
fListen = gArgs.GetBoolArg("-listen", DEFAULT_LISTEN); | fListen = gArgs.GetBoolArg("-listen", DEFAULT_LISTEN); | ||||
fDiscover = gArgs.GetBoolArg("-discover", true); | fDiscover = gArgs.GetBoolArg("-discover", true); | ||||
fRelayTxes = !gArgs.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY); | g_relay_txes = !gArgs.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY); | ||||
for (const std::string &strAddr : gArgs.GetArgs("-externalip")) { | for (const std::string &strAddr : gArgs.GetArgs("-externalip")) { | ||||
CService addrLocal; | CService addrLocal; | ||||
if (Lookup(strAddr.c_str(), addrLocal, GetListenPort(), fNameLookup) && | if (Lookup(strAddr.c_str(), addrLocal, GetListenPort(), fNameLookup) && | ||||
addrLocal.IsValid()) { | addrLocal.IsValid()) { | ||||
AddLocal(addrLocal, LOCAL_MANUAL); | AddLocal(addrLocal, LOCAL_MANUAL); | ||||
} else { | } else { | ||||
return InitError(ResolveErrMsg("externalip", strAddr)); | return InitError(ResolveErrMsg("externalip", strAddr)); | ||||
▲ Show 20 Lines • Show All 470 Lines • Show Last 20 Lines |