|
|
|
@ -82,7 +82,7 @@ CWallet* pwalletMain = NULL;
|
|
|
|
|
bool fFeeEstimatesInitialized = false;
|
|
|
|
|
static const bool DEFAULT_PROXYRANDOMIZE = true;
|
|
|
|
|
static const bool DEFAULT_REST_ENABLE = false;
|
|
|
|
|
static const bool DEFAULT_SAFEMODE = true;
|
|
|
|
|
static const bool DEFAULT_DISABLE_SAFEMODE = false;
|
|
|
|
|
static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false;
|
|
|
|
|
|
|
|
|
|
#if ENABLE_ZMQ
|
|
|
|
@ -326,7 +326,7 @@ void OnRPCPreCommand(const CRPCCommand& cmd)
|
|
|
|
|
{
|
|
|
|
|
// Observe safe mode
|
|
|
|
|
string strWarning = GetWarnings("rpc");
|
|
|
|
|
if (strWarning != "" && !GetBoolArg("-disablesafemode", !DEFAULT_SAFEMODE) &&
|
|
|
|
|
if (strWarning != "" && !GetBoolArg("-disablesafemode", DEFAULT_DISABLE_SAFEMODE) &&
|
|
|
|
|
!cmd.okSafeMode)
|
|
|
|
|
throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, string("Safe mode: ") + strWarning);
|
|
|
|
|
}
|
|
|
|
@ -379,7 +379,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
|
strUsage += HelpMessageOpt("-bind=<addr>", _("Bind to given address and always listen on it. Use [host]:port notation for IPv6"));
|
|
|
|
|
strUsage += HelpMessageOpt("-connect=<ip>", _("Connect only to the specified node(s)"));
|
|
|
|
|
strUsage += HelpMessageOpt("-discover", _("Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)"));
|
|
|
|
|
strUsage += HelpMessageOpt("-dns", strprintf(_("Allow DNS lookups for -addnode, -seednode and -connect (default: %u)"), fNameLookup));
|
|
|
|
|
strUsage += HelpMessageOpt("-dns", _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + strprintf(_("(default: %u)"), DEFAULT_NAME_LOOKUP));
|
|
|
|
|
strUsage += HelpMessageOpt("-dnsseed", _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)"));
|
|
|
|
|
strUsage += HelpMessageOpt("-externalip=<ip>", _("Specify your own public address"));
|
|
|
|
|
strUsage += HelpMessageOpt("-forcednsseed", strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"), DEFAULT_FORCEDNSSEED));
|
|
|
|
@ -392,7 +392,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
|
strUsage += HelpMessageOpt("-mempooltxcostlimit=<n>",strprintf(_("An upper bound on the maximum size in bytes of all transactions in the mempool. (default: %s)"), DEFAULT_MEMPOOL_TOTAL_COST_LIMIT));
|
|
|
|
|
strUsage += HelpMessageOpt("-onion=<ip:port>", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy"));
|
|
|
|
|
strUsage += HelpMessageOpt("-onlynet=<net>", _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)"));
|
|
|
|
|
strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), fIsBareMultisigStd));
|
|
|
|
|
strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), DEFAULT_PERMIT_BAREMULTISIG));
|
|
|
|
|
strUsage += HelpMessageOpt("-peerbloomfilters", strprintf(_("Support filtering of blocks and transaction with Bloom filters (default: %u)"), 1));
|
|
|
|
|
if (showDebug)
|
|
|
|
|
strUsage += HelpMessageOpt("-enforcenodebloom", strprintf("Enforce minimum protocol version to limit use of Bloom filters (default: %u)", 0));
|
|
|
|
@ -420,8 +420,8 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
|
CURRENCY_UNIT, FormatMoney(payTxFee.GetFeePerK())));
|
|
|
|
|
strUsage += HelpMessageOpt("-rescan", _("Rescan the block chain for missing wallet transactions") + " " + _("on startup"));
|
|
|
|
|
strUsage += HelpMessageOpt("-salvagewallet", _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup"));
|
|
|
|
|
strUsage += HelpMessageOpt("-sendfreetransactions", strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), fSendFreeTransactions));
|
|
|
|
|
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), bSpendZeroConfChange));
|
|
|
|
|
strUsage += HelpMessageOpt("-sendfreetransactions", strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), DEFAULT_SEND_FREE_TRANSACTIONS));
|
|
|
|
|
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), DEFAULT_SPEND_ZEROCONF_CHANGE));
|
|
|
|
|
strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), DEFAULT_TX_CONFIRM_TARGET));
|
|
|
|
|
strUsage += HelpMessageOpt("-txexpirydelta", strprintf(_("Set the number of blocks after which a transaction that has not been mined will become invalid (min: %u, default: %u (pre-Blossom) or %u (post-Blossom))"), TX_EXPIRING_SOON_THRESHOLD + 1, DEFAULT_PRE_BLOSSOM_TX_EXPIRY_DELTA, DEFAULT_POST_BLOSSOM_TX_EXPIRY_DELTA));
|
|
|
|
|
strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees (in %s) to use in a single wallet transaction; setting this too low may abort large transactions (default: %s)"),
|
|
|
|
@ -453,11 +453,11 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
|
strUsage += HelpMessageGroup(_("Debugging/Testing options:"));
|
|
|
|
|
if (showDebug)
|
|
|
|
|
{
|
|
|
|
|
strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", fCheckpointsEnabled));
|
|
|
|
|
strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", DEFAULT_CHECKPOINTS_ENABLED));
|
|
|
|
|
#ifdef ENABLE_WALLET
|
|
|
|
|
strUsage += HelpMessageOpt("-dblogsize=<n>", strprintf("Flush wallet database activity from memory to disk log every <n> megabytes (default: %u)", DEFAULT_WALLET_DBLOGSIZE));
|
|
|
|
|
#endif
|
|
|
|
|
strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", !DEFAULT_SAFEMODE));
|
|
|
|
|
strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", DEFAULT_DISABLE_SAFEMODE));
|
|
|
|
|
strUsage += HelpMessageOpt("-testsafemode", strprintf("Force safe mode (default: %u)", DEFAULT_TESTSAFEMODE));
|
|
|
|
|
strUsage += HelpMessageOpt("-dropmessagestest=<n>", "Randomly drop 1 of every <n> network messages");
|
|
|
|
|
strUsage += HelpMessageOpt("-fuzzmessagestest=<n>", "Randomly fuzz 1 of every <n> network messages");
|
|
|
|
@ -473,8 +473,8 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
|
_("If <category> is not supplied or if <category> = 1, output all debugging information.") + " " + _("<category> can be:") + " " + debugCategories + ".");
|
|
|
|
|
strUsage += HelpMessageOpt("-experimentalfeatures", _("Enable use of experimental features"));
|
|
|
|
|
strUsage += HelpMessageOpt("-help-debug", _("Show all debugging options (usage: --help -help-debug)"));
|
|
|
|
|
strUsage += HelpMessageOpt("-logips", strprintf(_("Include IP addresses in debug output (default: %u)"), fLogIPs));
|
|
|
|
|
strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), fLogTimestamps));
|
|
|
|
|
strUsage += HelpMessageOpt("-logips", strprintf(_("Include IP addresses in debug output (default: %u)"), DEFAULT_LOGIPS));
|
|
|
|
|
strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), DEFAULT_LOGTIMESTAMPS));
|
|
|
|
|
if (showDebug)
|
|
|
|
|
{
|
|
|
|
|
strUsage += HelpMessageOpt("-limitfreerelay=<n>", strprintf("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default: %u)", DEFAULT_LIMITFREERELAY));
|
|
|
|
@ -497,7 +497,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
|
AppendParamsHelpMessages(strUsage, showDebug);
|
|
|
|
|
|
|
|
|
|
strUsage += HelpMessageGroup(_("Node relay options:"));
|
|
|
|
|
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), fAcceptDatacarrier));
|
|
|
|
|
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER));
|
|
|
|
|
strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY));
|
|
|
|
|
|
|
|
|
|
strUsage += HelpMessageGroup(_("Block creation options:"));
|
|
|
|
@ -860,8 +860,8 @@ void InitParameterInteraction()
|
|
|
|
|
void InitLogging()
|
|
|
|
|
{
|
|
|
|
|
fPrintToConsole = GetBoolArg("-printtoconsole", false);
|
|
|
|
|
fLogTimestamps = GetBoolArg("-logtimestamps", fLogTimestamps);
|
|
|
|
|
fLogIPs = GetBoolArg("-logips", fLogIPs);
|
|
|
|
|
fLogTimestamps = GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS);
|
|
|
|
|
fLogIPs = GetBoolArg("-logips", DEFAULT_LOGIPS);
|
|
|
|
|
|
|
|
|
|
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
|
|
|
|
LogPrintf("Zcash version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
|
|
|
|
@ -1002,7 +1002,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
|
mempool.SetMempoolCostLimit(mempoolTotalCostLimit, mempoolEvictionMemorySeconds);
|
|
|
|
|
|
|
|
|
|
fCheckBlockIndex = GetBoolArg("-checkblockindex", chainparams.DefaultConsistencyChecks());
|
|
|
|
|
fCheckpointsEnabled = GetBoolArg("-checkpoints", fCheckpointsEnabled);
|
|
|
|
|
fCheckpointsEnabled = GetBoolArg("-checkpoints", DEFAULT_CHECKPOINTS_ENABLED);
|
|
|
|
|
|
|
|
|
|
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
|
|
|
|
|
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
|
|
|
|
@ -1101,8 +1101,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
|
}
|
|
|
|
|
expiryDeltaArg = expiryDelta;
|
|
|
|
|
}
|
|
|
|
|
bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", bSpendZeroConfChange);
|
|
|
|
|
fSendFreeTransactions = GetBoolArg("-sendfreetransactions", fSendFreeTransactions);
|
|
|
|
|
bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE);
|
|
|
|
|
fSendFreeTransactions = GetBoolArg("-sendfreetransactions", DEFAULT_SEND_FREE_TRANSACTIONS);
|
|
|
|
|
|
|
|
|
|
std::string strWalletFile = GetArg("-wallet", "wallet.dat");
|
|
|
|
|
// Check Sapling migration address if set and is a valid Sapling address
|
|
|
|
@ -1115,8 +1115,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
|
}
|
|
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
|
|
|
|
|
|
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", fIsBareMultisigStd);
|
|
|
|
|
fAcceptDatacarrier = GetBoolArg("-datacarrier", fAcceptDatacarrier);
|
|
|
|
|
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", DEFAULT_PERMIT_BAREMULTISIG);
|
|
|
|
|
fAcceptDatacarrier = GetBoolArg("-datacarrier", DEFAULT_ACCEPT_DATACARRIER);
|
|
|
|
|
nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes);
|
|
|
|
|
|
|
|
|
|
fAlerts = GetBoolArg("-alerts", DEFAULT_ALERTS);
|
|
|
|
@ -1373,7 +1373,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
|
// see Step 2: parameter interactions for more information about these
|
|
|
|
|
fListen = GetBoolArg("-listen", DEFAULT_LISTEN);
|
|
|
|
|
fDiscover = GetBoolArg("-discover", true);
|
|
|
|
|
fNameLookup = GetBoolArg("-dns", fNameLookup);
|
|
|
|
|
fNameLookup = GetBoolArg("-dns", DEFAULT_NAME_LOOKUP);
|
|
|
|
|
|
|
|
|
|
bool fBound = false;
|
|
|
|
|
if (fListen) {
|
|
|
|
|