|
|
@ -28,6 +28,7 @@
|
|
|
|
#include "net.h"
|
|
|
|
#include "net.h"
|
|
|
|
#include "rpc/server.h"
|
|
|
|
#include "rpc/server.h"
|
|
|
|
#include "rpc/register.h"
|
|
|
|
#include "rpc/register.h"
|
|
|
|
|
|
|
|
#include "script/sigcache.h"
|
|
|
|
#include "script/standard.h"
|
|
|
|
#include "script/standard.h"
|
|
|
|
#include "script/sigcache.h"
|
|
|
|
#include "script/sigcache.h"
|
|
|
|
#include "scheduler.h"
|
|
|
|
#include "scheduler.h"
|
|
|
@ -80,6 +81,10 @@ ZCJoinSplit* pzcashParams = NULL;
|
|
|
|
CWallet* pwalletMain = NULL;
|
|
|
|
CWallet* pwalletMain = NULL;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
bool fFeeEstimatesInitialized = false;
|
|
|
|
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_STOPAFTERBLOCKIMPORT = false;
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLE_ZMQ
|
|
|
|
#if ENABLE_ZMQ
|
|
|
|
static CZMQNotificationInterface* pzmqNotificationInterface = NULL;
|
|
|
|
static CZMQNotificationInterface* pzmqNotificationInterface = NULL;
|
|
|
@ -322,7 +327,7 @@ void OnRPCPreCommand(const CRPCCommand& cmd)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Observe safe mode
|
|
|
|
// Observe safe mode
|
|
|
|
string strWarning = GetWarnings("rpc");
|
|
|
|
string strWarning = GetWarnings("rpc");
|
|
|
|
if (strWarning != "" && !GetBoolArg("-disablesafemode", false) &&
|
|
|
|
if (strWarning != "" && !GetBoolArg("-disablesafemode", !DEFAULT_SAFEMODE) &&
|
|
|
|
!cmd.okSafeMode)
|
|
|
|
!cmd.okSafeMode)
|
|
|
|
throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, string("Safe mode: ") + strWarning);
|
|
|
|
throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, string("Safe mode: ") + strWarning);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -341,7 +346,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)"));
|
|
|
|
strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)"));
|
|
|
|
strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), DEFAULT_CHECKBLOCKS));
|
|
|
|
strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), DEFAULT_CHECKBLOCKS));
|
|
|
|
strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), DEFAULT_CHECKLEVEL));
|
|
|
|
strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), DEFAULT_CHECKLEVEL));
|
|
|
|
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "zcash.conf"));
|
|
|
|
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), BITCOIN_CONF_FILENAME));
|
|
|
|
if (mode == HMM_BITCOIND)
|
|
|
|
if (mode == HMM_BITCOIND)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if !defined(WIN32)
|
|
|
|
#if !defined(WIN32)
|
|
|
@ -357,7 +362,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
strUsage += HelpMessageOpt("-par=<n>", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),
|
|
|
|
strUsage += HelpMessageOpt("-par=<n>", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),
|
|
|
|
-GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS));
|
|
|
|
-GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS));
|
|
|
|
#ifndef WIN32
|
|
|
|
#ifndef WIN32
|
|
|
|
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "zcashd.pid"));
|
|
|
|
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), BITCOIN_PID_FILENAME));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. "
|
|
|
|
strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. "
|
|
|
|
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
|
|
|
|
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
|
|
|
@ -366,35 +371,35 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
#if !defined(WIN32)
|
|
|
|
#if !defined(WIN32)
|
|
|
|
strUsage += HelpMessageOpt("-sysperms", _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)"));
|
|
|
|
strUsage += HelpMessageOpt("-sysperms", _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)"));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
strUsage += HelpMessageOpt("-txindex", strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"), 0));
|
|
|
|
strUsage += HelpMessageOpt("-txindex", strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"), DEFAULT_TXINDEX));
|
|
|
|
|
|
|
|
|
|
|
|
strUsage += HelpMessageGroup(_("Connection options:"));
|
|
|
|
strUsage += HelpMessageGroup(_("Connection options:"));
|
|
|
|
strUsage += HelpMessageOpt("-addnode=<ip>", _("Add a node to connect to and attempt to keep the connection open"));
|
|
|
|
strUsage += HelpMessageOpt("-addnode=<ip>", _("Add a node to connect to and attempt to keep the connection open"));
|
|
|
|
strUsage += HelpMessageOpt("-banscore=<n>", strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"), 100));
|
|
|
|
strUsage += HelpMessageOpt("-banscore=<n>", strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"), DEFAULT_BANSCORE_THRESHOLD));
|
|
|
|
strUsage += HelpMessageOpt("-bantime=<n>", strprintf(_("Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), 86400));
|
|
|
|
strUsage += HelpMessageOpt("-bantime=<n>", strprintf(_("Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), DEFAULT_MISBEHAVING_BANTIME));
|
|
|
|
strUsage += HelpMessageOpt("-bind=<addr>", _("Bind to given address and always listen on it. Use [host]:port notation for IPv6"));
|
|
|
|
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("-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("-discover", _("Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)"));
|
|
|
|
strUsage += HelpMessageOpt("-dns", _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + _("(default: 1)"));
|
|
|
|
strUsage += HelpMessageOpt("-dns", strprintf(_("Allow DNS lookups for -addnode, -seednode and -connect (default: %u)"), fNameLookup));
|
|
|
|
strUsage += HelpMessageOpt("-dnsseed", _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)"));
|
|
|
|
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("-externalip=<ip>", _("Specify your own public address"));
|
|
|
|
strUsage += HelpMessageOpt("-forcednsseed", strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"), 0));
|
|
|
|
strUsage += HelpMessageOpt("-forcednsseed", strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"), DEFAULT_FORCEDNSSEED));
|
|
|
|
strUsage += HelpMessageOpt("-listen", _("Accept connections from outside (default: 1 if no -proxy or -connect)"));
|
|
|
|
strUsage += HelpMessageOpt("-listen", _("Accept connections from outside (default: 1 if no -proxy or -connect)"));
|
|
|
|
strUsage += HelpMessageOpt("-listenonion", strprintf(_("Automatically create Tor hidden service (default: %d)"), DEFAULT_LISTEN_ONION));
|
|
|
|
strUsage += HelpMessageOpt("-listenonion", strprintf(_("Automatically create Tor hidden service (default: %d)"), DEFAULT_LISTEN_ONION));
|
|
|
|
strUsage += HelpMessageOpt("-maxconnections=<n>", strprintf(_("Maintain at most <n> connections to peers (default: %u)"), DEFAULT_MAX_PEER_CONNECTIONS));
|
|
|
|
strUsage += HelpMessageOpt("-maxconnections=<n>", strprintf(_("Maintain at most <n> connections to peers (default: %u)"), DEFAULT_MAX_PEER_CONNECTIONS));
|
|
|
|
strUsage += HelpMessageOpt("-maxreceivebuffer=<n>", strprintf(_("Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"), 5000));
|
|
|
|
strUsage += HelpMessageOpt("-maxreceivebuffer=<n>", strprintf(_("Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"), DEFAULT_MAXRECEIVEBUFFER));
|
|
|
|
strUsage += HelpMessageOpt("-maxsendbuffer=<n>", strprintf(_("Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"), 1000));
|
|
|
|
strUsage += HelpMessageOpt("-maxsendbuffer=<n>", strprintf(_("Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"), DEFAULT_MAXSENDBUFFER));
|
|
|
|
strUsage += HelpMessageOpt("-mempoolevictionmemoryminutes=<n>", strprintf(_("The number of minutes before allowing rejected transactions to re-enter the mempool. (default: %u)"), DEFAULT_MEMPOOL_EVICTION_MEMORY_MINUTES));
|
|
|
|
strUsage += HelpMessageOpt("-mempoolevictionmemoryminutes=<n>", strprintf(_("The number of minutes before allowing rejected transactions to re-enter the mempool. (default: %u)"), DEFAULT_MEMPOOL_EVICTION_MEMORY_MINUTES));
|
|
|
|
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("-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("-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("-onlynet=<net>", _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)"));
|
|
|
|
strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), 1));
|
|
|
|
strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), fIsBareMultisigStd));
|
|
|
|
strUsage += HelpMessageOpt("-peerbloomfilters", strprintf(_("Support filtering of blocks and transaction with Bloom filters (default: %u)"), 1));
|
|
|
|
strUsage += HelpMessageOpt("-peerbloomfilters", strprintf(_("Support filtering of blocks and transaction with Bloom filters (default: %u)"), 1));
|
|
|
|
if (showDebug)
|
|
|
|
if (showDebug)
|
|
|
|
strUsage += HelpMessageOpt("-enforcenodebloom", strprintf("Enforce minimum protocol version to limit use of Bloom filters (default: %u)", 0));
|
|
|
|
strUsage += HelpMessageOpt("-enforcenodebloom", strprintf("Enforce minimum protocol version to limit use of Bloom filters (default: %u)", 0));
|
|
|
|
strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 8233, 18233));
|
|
|
|
strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), Params(CBaseChainParams::MAIN).GetDefaultPort(), Params(CBaseChainParams::TESTNET).GetDefaultPort()));
|
|
|
|
strUsage += HelpMessageOpt("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"));
|
|
|
|
strUsage += HelpMessageOpt("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"));
|
|
|
|
strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), 1));
|
|
|
|
strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), DEFAULT_PROXYRANDOMIZE));
|
|
|
|
strUsage += HelpMessageOpt("-seednode=<ip>", _("Connect to a node to retrieve peer addresses, and disconnect"));
|
|
|
|
strUsage += HelpMessageOpt("-seednode=<ip>", _("Connect to a node to retrieve peer addresses, and disconnect"));
|
|
|
|
strUsage += HelpMessageOpt("-timeout=<n>", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT));
|
|
|
|
strUsage += HelpMessageOpt("-timeout=<n>", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT));
|
|
|
|
strUsage += HelpMessageOpt("-torcontrol=<ip>:<port>", strprintf(_("Tor control port to use if onion listening enabled (default: %s)"), DEFAULT_TOR_CONTROL));
|
|
|
|
strUsage += HelpMessageOpt("-torcontrol=<ip>:<port>", strprintf(_("Tor control port to use if onion listening enabled (default: %s)"), DEFAULT_TOR_CONTROL));
|
|
|
@ -406,7 +411,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
#ifdef ENABLE_WALLET
|
|
|
|
#ifdef ENABLE_WALLET
|
|
|
|
strUsage += HelpMessageGroup(_("Wallet options:"));
|
|
|
|
strUsage += HelpMessageGroup(_("Wallet options:"));
|
|
|
|
strUsage += HelpMessageOpt("-disablewallet", _("Do not load the wallet and disable wallet RPC calls"));
|
|
|
|
strUsage += HelpMessageOpt("-disablewallet", _("Do not load the wallet and disable wallet RPC calls"));
|
|
|
|
strUsage += HelpMessageOpt("-keypool=<n>", strprintf(_("Set key pool size to <n> (default: %u)"), 100));
|
|
|
|
strUsage += HelpMessageOpt("-keypool=<n>", strprintf(_("Set key pool size to <n> (default: %u)"), DEFAULT_KEYPOOL_SIZE));
|
|
|
|
strUsage += HelpMessageOpt("-migration", _("Enable the Sprout to Sapling migration"));
|
|
|
|
strUsage += HelpMessageOpt("-migration", _("Enable the Sprout to Sapling migration"));
|
|
|
|
strUsage += HelpMessageOpt("-migrationdestaddress=<zaddr>", _("Set the Sapling migration address"));
|
|
|
|
strUsage += HelpMessageOpt("-migrationdestaddress=<zaddr>", _("Set the Sapling migration address"));
|
|
|
|
if (showDebug)
|
|
|
|
if (showDebug)
|
|
|
@ -416,15 +421,15 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
CURRENCY_UNIT, FormatMoney(payTxFee.GetFeePerK())));
|
|
|
|
CURRENCY_UNIT, FormatMoney(payTxFee.GetFeePerK())));
|
|
|
|
strUsage += HelpMessageOpt("-rescan", _("Rescan the block chain for missing wallet transactions") + " " + _("on startup"));
|
|
|
|
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("-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)"), 0));
|
|
|
|
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)"), 1));
|
|
|
|
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), bSpendZeroConfChange));
|
|
|
|
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("-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("-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)"),
|
|
|
|
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)"),
|
|
|
|
CURRENCY_UNIT, FormatMoney(maxTxFee)));
|
|
|
|
CURRENCY_UNIT, FormatMoney(maxTxFee)));
|
|
|
|
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup"));
|
|
|
|
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format") + " " + _("on startup"));
|
|
|
|
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat"));
|
|
|
|
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat"));
|
|
|
|
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), true));
|
|
|
|
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), DEFAULT_WALLETBROADCAST));
|
|
|
|
strUsage += HelpMessageOpt("-walletnotify=<cmd>", _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)"));
|
|
|
|
strUsage += HelpMessageOpt("-walletnotify=<cmd>", _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)"));
|
|
|
|
strUsage += HelpMessageOpt("-zapwallettxes=<mode>", _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") +
|
|
|
|
strUsage += HelpMessageOpt("-zapwallettxes=<mode>", _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") +
|
|
|
|
" " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)"));
|
|
|
|
" " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)"));
|
|
|
@ -449,18 +454,18 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
strUsage += HelpMessageGroup(_("Debugging/Testing options:"));
|
|
|
|
strUsage += HelpMessageGroup(_("Debugging/Testing options:"));
|
|
|
|
if (showDebug)
|
|
|
|
if (showDebug)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", 1));
|
|
|
|
strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", fCheckpointsEnabled));
|
|
|
|
#ifdef ENABLE_WALLET
|
|
|
|
#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));
|
|
|
|
strUsage += HelpMessageOpt("-dblogsize=<n>", strprintf("Flush wallet database activity from memory to disk log every <n> megabytes (default: %u)", DEFAULT_WALLET_DBLOGSIZE));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", 0));
|
|
|
|
strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", !DEFAULT_SAFEMODE));
|
|
|
|
strUsage += HelpMessageOpt("-testsafemode", strprintf("Force safe mode (default: %u)", 0));
|
|
|
|
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("-dropmessagestest=<n>", "Randomly drop 1 of every <n> network messages");
|
|
|
|
strUsage += HelpMessageOpt("-fuzzmessagestest=<n>", "Randomly fuzz 1 of every <n> network messages");
|
|
|
|
strUsage += HelpMessageOpt("-fuzzmessagestest=<n>", "Randomly fuzz 1 of every <n> network messages");
|
|
|
|
#ifdef ENABLE_WALLET
|
|
|
|
#ifdef ENABLE_WALLET
|
|
|
|
strUsage += HelpMessageOpt("-flushwallet", strprintf("Run a thread to flush wallet periodically (default: %u)", 1));
|
|
|
|
strUsage += HelpMessageOpt("-flushwallet", strprintf("Run a thread to flush wallet periodically (default: %u)", DEFAULT_FLUSHWALLET));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
strUsage += HelpMessageOpt("-stopafterblockimport", strprintf("Stop running after importing blocks from disk (default: %u)", 0));
|
|
|
|
strUsage += HelpMessageOpt("-stopafterblockimport", strprintf("Stop running after importing blocks from disk (default: %u)", DEFAULT_STOPAFTERBLOCKIMPORT));
|
|
|
|
strUsage += HelpMessageOpt("-nuparams=hexBranchId:activationHeight", "Use given activation height for specified network upgrade (regtest-only)");
|
|
|
|
strUsage += HelpMessageOpt("-nuparams=hexBranchId:activationHeight", "Use given activation height for specified network upgrade (regtest-only)");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
string debugCategories = "addrman, alert, bench, coindb, db, estimatefee, http, libevent, lock, mempool, net, partitioncheck, pow, proxy, prune, "
|
|
|
|
string debugCategories = "addrman, alert, bench, coindb, db, estimatefee, http, libevent, lock, mempool, net, partitioncheck, pow, proxy, prune, "
|
|
|
@ -469,12 +474,12 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
_("If <category> is not supplied or if <category> = 1, output all debugging information.") + " " + _("<category> can be:") + " " + debugCategories + ".");
|
|
|
|
_("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("-experimentalfeatures", _("Enable use of experimental features"));
|
|
|
|
strUsage += HelpMessageOpt("-help-debug", _("Show all debugging options (usage: --help -help-debug)"));
|
|
|
|
strUsage += HelpMessageOpt("-help-debug", _("Show all debugging options (usage: --help -help-debug)"));
|
|
|
|
strUsage += HelpMessageOpt("-logips", strprintf(_("Include IP addresses in debug output (default: %u)"), 0));
|
|
|
|
strUsage += HelpMessageOpt("-logips", strprintf(_("Include IP addresses in debug output (default: %u)"), fLogIPs));
|
|
|
|
strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), 1));
|
|
|
|
strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), fLogTimestamps));
|
|
|
|
if (showDebug)
|
|
|
|
if (showDebug)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
strUsage += HelpMessageOpt("-limitfreerelay=<n>", strprintf("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default: %u)", 15));
|
|
|
|
strUsage += HelpMessageOpt("-limitfreerelay=<n>", strprintf("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default: %u)", DEFAULT_LIMITFREERELAY));
|
|
|
|
strUsage += HelpMessageOpt("-relaypriority", strprintf("Require high priority for relaying free or low-fee transactions (default: %u)", 0));
|
|
|
|
strUsage += HelpMessageOpt("-relaypriority", strprintf("Require high priority for relaying free or low-fee transactions (default: %u)", DEFAULT_RELAYPRIORITY));
|
|
|
|
strUsage += HelpMessageOpt("-maxsigcachesize=<n>", strprintf("Limit size of signature cache to <n> MiB (default: %u)", DEFAULT_MAX_SIG_CACHE_SIZE));
|
|
|
|
strUsage += HelpMessageOpt("-maxsigcachesize=<n>", strprintf("Limit size of signature cache to <n> MiB (default: %u)", DEFAULT_MAX_SIG_CACHE_SIZE));
|
|
|
|
strUsage += HelpMessageOpt("-maxtipage=<n>", strprintf("Maximum tip age in seconds to consider node in initial block download (default: %u)", DEFAULT_MAX_TIP_AGE));
|
|
|
|
strUsage += HelpMessageOpt("-maxtipage=<n>", strprintf("Maximum tip age in seconds to consider node in initial block download (default: %u)", DEFAULT_MAX_TIP_AGE));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -483,19 +488,19 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file"));
|
|
|
|
strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file"));
|
|
|
|
if (showDebug)
|
|
|
|
if (showDebug)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
strUsage += HelpMessageOpt("-printpriority", strprintf("Log transaction priority and fee per kB when mining blocks (default: %u)", 0));
|
|
|
|
strUsage += HelpMessageOpt("-printpriority", strprintf("Log transaction priority and fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY));
|
|
|
|
strUsage += HelpMessageOpt("-privdb", strprintf("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)", 1));
|
|
|
|
strUsage += HelpMessageOpt("-privdb", strprintf("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)", DEFAULT_WALLET_PRIVDB));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// strUsage += HelpMessageOpt("-shrinkdebugfile", _("Shrink debug.log file on client startup (default: 1 when no -debug)"));
|
|
|
|
// strUsage += HelpMessageOpt("-shrinkdebugfile", _("Shrink debug.log file on client startup (default: 1 when no -debug)"));
|
|
|
|
|
|
|
|
|
|
|
|
AppendParamsHelpMessages(strUsage, showDebug);
|
|
|
|
AppendParamsHelpMessages(strUsage, showDebug);
|
|
|
|
|
|
|
|
|
|
|
|
strUsage += HelpMessageGroup(_("Node relay options:"));
|
|
|
|
strUsage += HelpMessageGroup(_("Node relay options:"));
|
|
|
|
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), 1));
|
|
|
|
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), fAcceptDatacarrier));
|
|
|
|
strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY));
|
|
|
|
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:"));
|
|
|
|
strUsage += HelpMessageGroup(_("Block creation options:"));
|
|
|
|
strUsage += HelpMessageOpt("-blockminsize=<n>", strprintf(_("Set minimum block size in bytes (default: %u)"), 0));
|
|
|
|
strUsage += HelpMessageOpt("-blockminsize=<n>", strprintf(_("Set minimum block size in bytes (default: %u)"), DEFAULT_BLOCK_MIN_SIZE));
|
|
|
|
strUsage += HelpMessageOpt("-blockmaxsize=<n>", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE));
|
|
|
|
strUsage += HelpMessageOpt("-blockmaxsize=<n>", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE));
|
|
|
|
strUsage += HelpMessageOpt("-blockprioritysize=<n>", strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), DEFAULT_BLOCK_PRIORITY_SIZE));
|
|
|
|
strUsage += HelpMessageOpt("-blockprioritysize=<n>", strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), DEFAULT_BLOCK_PRIORITY_SIZE));
|
|
|
|
if (GetBoolArg("-help-debug", false))
|
|
|
|
if (GetBoolArg("-help-debug", false))
|
|
|
@ -503,7 +508,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_MINING
|
|
|
|
#ifdef ENABLE_MINING
|
|
|
|
strUsage += HelpMessageGroup(_("Mining options:"));
|
|
|
|
strUsage += HelpMessageGroup(_("Mining options:"));
|
|
|
|
strUsage += HelpMessageOpt("-gen", strprintf(_("Generate coins (default: %u)"), 0));
|
|
|
|
strUsage += HelpMessageOpt("-gen", strprintf(_("Generate coins (default: %u)"), DEFAULT_GENERATE));
|
|
|
|
strUsage += HelpMessageOpt("-genproclimit=<n>", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), DEFAULT_GENERATE_THREADS));
|
|
|
|
strUsage += HelpMessageOpt("-genproclimit=<n>", strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), DEFAULT_GENERATE_THREADS));
|
|
|
|
strUsage += HelpMessageOpt("-equihashsolver=<name>", _("Specify the Equihash solver to be used if enabled (default: \"default\")"));
|
|
|
|
strUsage += HelpMessageOpt("-equihashsolver=<name>", _("Specify the Equihash solver to be used if enabled (default: \"default\")"));
|
|
|
|
strUsage += HelpMessageOpt("-mineraddress=<addr>", _("Send mined coins to a specific single address"));
|
|
|
|
strUsage += HelpMessageOpt("-mineraddress=<addr>", _("Send mined coins to a specific single address"));
|
|
|
@ -519,7 +524,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|
|
|
|
|
|
|
|
|
|
|
strUsage += HelpMessageGroup(_("RPC server options:"));
|
|
|
|
strUsage += HelpMessageGroup(_("RPC server options:"));
|
|
|
|
strUsage += HelpMessageOpt("-server", _("Accept command line and JSON-RPC commands"));
|
|
|
|
strUsage += HelpMessageOpt("-server", _("Accept command line and JSON-RPC commands"));
|
|
|
|
strUsage += HelpMessageOpt("-rest", strprintf(_("Accept public REST requests (default: %u)"), 0));
|
|
|
|
strUsage += HelpMessageOpt("-rest", strprintf(_("Accept public REST requests (default: %u)"), DEFAULT_REST_ENABLE));
|
|
|
|
strUsage += HelpMessageOpt("-rpcbind=<addr>", _("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)"));
|
|
|
|
strUsage += HelpMessageOpt("-rpcbind=<addr>", _("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)"));
|
|
|
|
strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections"));
|
|
|
|
strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections"));
|
|
|
|
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
|
|
|
|
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
|
|
|
@ -661,7 +666,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (GetBoolArg("-stopafterblockimport", false)) {
|
|
|
|
if (GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) {
|
|
|
|
LogPrintf("Stopping after block import\n");
|
|
|
|
LogPrintf("Stopping after block import\n");
|
|
|
|
StartShutdown();
|
|
|
|
StartShutdown();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -786,7 +791,7 @@ bool AppInitServers(boost::thread_group& threadGroup)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
if (!StartHTTPRPC())
|
|
|
|
if (!StartHTTPRPC())
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
if (GetBoolArg("-rest", false) && !StartREST())
|
|
|
|
if (GetBoolArg("-rest", DEFAULT_REST_ENABLE) && !StartREST())
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
if (!StartHTTPServer())
|
|
|
|
if (!StartHTTPServer())
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
@ -854,8 +859,8 @@ void InitParameterInteraction()
|
|
|
|
void InitLogging()
|
|
|
|
void InitLogging()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
fPrintToConsole = GetBoolArg("-printtoconsole", false);
|
|
|
|
fPrintToConsole = GetBoolArg("-printtoconsole", false);
|
|
|
|
fLogTimestamps = GetBoolArg("-logtimestamps", true);
|
|
|
|
fLogTimestamps = GetBoolArg("-logtimestamps", fLogTimestamps);
|
|
|
|
fLogIPs = GetBoolArg("-logips", false);
|
|
|
|
fLogIPs = GetBoolArg("-logips", fLogIPs);
|
|
|
|
|
|
|
|
|
|
|
|
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
|
|
|
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);
|
|
|
|
LogPrintf("Zcash version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);
|
|
|
@ -946,7 +951,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
|
|
|
|
|
|
|
|
// if using block pruning, then disable txindex
|
|
|
|
// if using block pruning, then disable txindex
|
|
|
|
if (GetArg("-prune", 0)) {
|
|
|
|
if (GetArg("-prune", 0)) {
|
|
|
|
if (GetBoolArg("-txindex", false))
|
|
|
|
if (GetBoolArg("-txindex", DEFAULT_TXINDEX))
|
|
|
|
return InitError(_("Prune mode is incompatible with -txindex."));
|
|
|
|
return InitError(_("Prune mode is incompatible with -txindex."));
|
|
|
|
#ifdef ENABLE_WALLET
|
|
|
|
#ifdef ENABLE_WALLET
|
|
|
|
if (GetBoolArg("-rescan", false)) {
|
|
|
|
if (GetBoolArg("-rescan", false)) {
|
|
|
@ -996,7 +1001,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
mempool.SetMempoolCostLimit(mempoolTotalCostLimit, mempoolEvictionMemorySeconds);
|
|
|
|
mempool.SetMempoolCostLimit(mempoolTotalCostLimit, mempoolEvictionMemorySeconds);
|
|
|
|
|
|
|
|
|
|
|
|
fCheckBlockIndex = GetBoolArg("-checkblockindex", chainparams.DefaultConsistencyChecks());
|
|
|
|
fCheckBlockIndex = GetBoolArg("-checkblockindex", chainparams.DefaultConsistencyChecks());
|
|
|
|
fCheckpointsEnabled = GetBoolArg("-checkpoints", true);
|
|
|
|
fCheckpointsEnabled = GetBoolArg("-checkpoints", fCheckpointsEnabled);
|
|
|
|
|
|
|
|
|
|
|
|
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
|
|
|
|
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
|
|
|
|
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
|
|
|
|
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
|
|
|
@ -1095,8 +1100,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
expiryDeltaArg = expiryDelta;
|
|
|
|
expiryDeltaArg = expiryDelta;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", true);
|
|
|
|
bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", bSpendZeroConfChange);
|
|
|
|
fSendFreeTransactions = GetBoolArg("-sendfreetransactions", false);
|
|
|
|
fSendFreeTransactions = GetBoolArg("-sendfreetransactions", fSendFreeTransactions);
|
|
|
|
|
|
|
|
|
|
|
|
std::string strWalletFile = GetArg("-wallet", "wallet.dat");
|
|
|
|
std::string strWalletFile = GetArg("-wallet", "wallet.dat");
|
|
|
|
// Check Sapling migration address if set and is a valid Sapling address
|
|
|
|
// Check Sapling migration address if set and is a valid Sapling address
|
|
|
@ -1109,7 +1114,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
#endif // ENABLE_WALLET
|
|
|
|
|
|
|
|
|
|
|
|
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", true);
|
|
|
|
fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", fIsBareMultisigStd);
|
|
|
|
|
|
|
|
fAcceptDatacarrier = GetBoolArg("-datacarrier", fAcceptDatacarrier);
|
|
|
|
nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes);
|
|
|
|
nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes);
|
|
|
|
|
|
|
|
|
|
|
|
fAlerts = GetBoolArg("-alerts", DEFAULT_ALERTS);
|
|
|
|
fAlerts = GetBoolArg("-alerts", DEFAULT_ALERTS);
|
|
|
@ -1330,7 +1336,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool proxyRandomize = GetBoolArg("-proxyrandomize", true);
|
|
|
|
bool proxyRandomize = GetBoolArg("-proxyrandomize", DEFAULT_PROXYRANDOMIZE);
|
|
|
|
// -proxy sets a proxy for all outgoing network traffic
|
|
|
|
// -proxy sets a proxy for all outgoing network traffic
|
|
|
|
// -noproxy (or -proxy=0) as well as the empty string can be used to not set a proxy, this is the default
|
|
|
|
// -noproxy (or -proxy=0) as well as the empty string can be used to not set a proxy, this is the default
|
|
|
|
std::string proxyArg = GetArg("-proxy", "");
|
|
|
|
std::string proxyArg = GetArg("-proxy", "");
|
|
|
@ -1366,7 +1372,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
// see Step 2: parameter interactions for more information about these
|
|
|
|
// see Step 2: parameter interactions for more information about these
|
|
|
|
fListen = GetBoolArg("-listen", DEFAULT_LISTEN);
|
|
|
|
fListen = GetBoolArg("-listen", DEFAULT_LISTEN);
|
|
|
|
fDiscover = GetBoolArg("-discover", true);
|
|
|
|
fDiscover = GetBoolArg("-discover", true);
|
|
|
|
fNameLookup = GetBoolArg("-dns", true);
|
|
|
|
fNameLookup = GetBoolArg("-dns", fNameLookup);
|
|
|
|
|
|
|
|
|
|
|
|
bool fBound = false;
|
|
|
|
bool fBound = false;
|
|
|
|
if (fListen) {
|
|
|
|
if (fListen) {
|
|
|
@ -1467,7 +1473,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
nTotalCache = std::max(nTotalCache, nMinDbCache << 20); // total cache cannot be less than nMinDbCache
|
|
|
|
nTotalCache = std::max(nTotalCache, nMinDbCache << 20); // total cache cannot be less than nMinDbCache
|
|
|
|
nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); // total cache cannot be greated than nMaxDbcache
|
|
|
|
nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); // total cache cannot be greated than nMaxDbcache
|
|
|
|
int64_t nBlockTreeDBCache = nTotalCache / 8;
|
|
|
|
int64_t nBlockTreeDBCache = nTotalCache / 8;
|
|
|
|
if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", false))
|
|
|
|
if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", DEFAULT_TXINDEX))
|
|
|
|
nBlockTreeDBCache = (1 << 21); // block tree db cache shouldn't be larger than 2 MiB
|
|
|
|
nBlockTreeDBCache = (1 << 21); // block tree db cache shouldn't be larger than 2 MiB
|
|
|
|
|
|
|
|
|
|
|
|
// https://github.com/bitpay/bitcoin/commit/c91d78b578a8700a45be936cb5bb0931df8f4b87#diff-c865a8939105e6350a50af02766291b7R1233
|
|
|
|
// https://github.com/bitpay/bitcoin/commit/c91d78b578a8700a45be936cb5bb0931df8f4b87#diff-c865a8939105e6350a50af02766291b7R1233
|
|
|
@ -1534,7 +1540,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Check for changed -txindex state
|
|
|
|
// Check for changed -txindex state
|
|
|
|
if (fTxIndex != GetBoolArg("-txindex", false)) {
|
|
|
|
if (fTxIndex != GetBoolArg("-txindex", DEFAULT_TXINDEX)) {
|
|
|
|
strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
|
|
|
|
strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1791,7 +1797,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pwalletMain->SetBroadcastTransactions(GetBoolArg("-walletbroadcast", true));
|
|
|
|
pwalletMain->SetBroadcastTransactions(GetBoolArg("-walletbroadcast", DEFAULT_WALLETBROADCAST));
|
|
|
|
} // (!fDisableWallet)
|
|
|
|
} // (!fDisableWallet)
|
|
|
|
#else // ENABLE_WALLET
|
|
|
|
#else // ENABLE_WALLET
|
|
|
|
LogPrintf("No wallet support compiled in!\n");
|
|
|
|
LogPrintf("No wallet support compiled in!\n");
|
|
|
@ -1909,7 +1915,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef ENABLE_MINING
|
|
|
|
#ifdef ENABLE_MINING
|
|
|
|
// Generate coins in the background
|
|
|
|
// Generate coins in the background
|
|
|
|
GenerateBitcoins(GetBoolArg("-gen", false), GetArg("-genproclimit", DEFAULT_GENERATE_THREADS), chainparams);
|
|
|
|
GenerateBitcoins(GetBoolArg("-gen", DEFAULT_GENERATE), GetArg("-genproclimit", DEFAULT_GENERATE_THREADS), chainparams);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// ********************************************************* Step 11: finished
|
|
|
|
// ********************************************************* Step 11: finished
|
|
|
|