From c98c88b3abf35d04c2058bd50ae50f2496e09594 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Sun, 26 May 2013 14:05:53 -0400 Subject: [PATCH] build: cosmetic: split usage string for easier formatting --- src/init.cpp | 136 +++++++++++++++++++++++++-------------------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index e9e5e278b..75229a3d6 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -158,89 +158,89 @@ bool static Bind(const CService &addr, unsigned int flags) { // Core-specific options shared between UI and daemon std::string HelpMessage() { - string strUsage = _("Options:") + "\n" + - " -? " + _("This help message") + "\n" + - " -conf= " + _("Specify configuration file (default: bitcoin.conf)") + "\n" + - " -pid= " + _("Specify pid file (default: bitcoind.pid)") + "\n" + - " -gen " + _("Generate coins (default: 0)") + "\n" + - " -datadir= " + _("Specify data directory") + "\n" + - " -dbcache= " + _("Set database cache size in megabytes (default: 25)") + "\n" + - " -timeout= " + _("Specify connection timeout in milliseconds (default: 5000)") + "\n" + - " -proxy= " + _("Connect through socks proxy") + "\n" + - " -socks= " + _("Select the version of socks proxy to use (4-5, default: 5)") + "\n" + - " -tor= " + _("Use proxy to reach tor hidden services (default: same as -proxy)") + "\n" - " -dns " + _("Allow DNS lookups for -addnode, -seednode and -connect") + "\n" + - " -port= " + _("Listen for connections on (default: 8333 or testnet: 18333)") + "\n" + - " -maxconnections= " + _("Maintain at most connections to peers (default: 125)") + "\n" + - " -addnode= " + _("Add a node to connect to and attempt to keep the connection open") + "\n" + - " -connect= " + _("Connect only to the specified node(s)") + "\n" + - " -seednode= " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n" + - " -externalip= " + _("Specify your own public address") + "\n" + - " -onlynet= " + _("Only connect to nodes in network (IPv4, IPv6 or Tor)") + "\n" + - " -discover " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n" + - " -checkpoints " + _("Only accept block chain matching built-in checkpoints (default: 1)") + "\n" + - " -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n" + - " -bind= " + _("Bind to given address and always listen on it. Use [host]:port notation for IPv6") + "\n" + - " -dnsseed " + _("Find peers using DNS lookup (default: 1 unless -connect)") + "\n" + - " -banscore= " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" + - " -bantime= " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" + - " -maxreceivebuffer= " + _("Maximum per-connection receive buffer, *1000 bytes (default: 5000)") + "\n" + - " -maxsendbuffer= " + _("Maximum per-connection send buffer, *1000 bytes (default: 1000)") + "\n" + + string strUsage = _("Options:") + "\n"; + strUsage += " -? " + _("This help message") + "\n"; + strUsage += " -conf= " + _("Specify configuration file (default: bitcoin.conf)") + "\n"; + strUsage += " -pid= " + _("Specify pid file (default: bitcoind.pid)") + "\n"; + strUsage += " -gen " + _("Generate coins (default: 0)") + "\n"; + strUsage += " -datadir= " + _("Specify data directory") + "\n"; + strUsage += " -dbcache= " + _("Set database cache size in megabytes (default: 25)") + "\n"; + strUsage += " -timeout= " + _("Specify connection timeout in milliseconds (default: 5000)") + "\n"; + strUsage += " -proxy= " + _("Connect through socks proxy") + "\n"; + strUsage += " -socks= " + _("Select the version of socks proxy to use (4-5, default: 5)") + "\n"; + strUsage += " -tor= " + _("Use proxy to reach tor hidden services (default: same as -proxy)") + "\n"; + strUsage += " -dns " + _("Allow DNS lookups for -addnode, -seednode and -connect") + "\n"; + strUsage += " -port= " + _("Listen for connections on (default: 8333 or testnet: 18333)") + "\n"; + strUsage += " -maxconnections= " + _("Maintain at most connections to peers (default: 125)") + "\n"; + strUsage += " -addnode= " + _("Add a node to connect to and attempt to keep the connection open") + "\n"; + strUsage += " -connect= " + _("Connect only to the specified node(s)") + "\n"; + strUsage += " -seednode= " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n"; + strUsage += " -externalip= " + _("Specify your own public address") + "\n"; + strUsage += " -onlynet= " + _("Only connect to nodes in network (IPv4, IPv6 or Tor)") + "\n"; + strUsage += " -discover " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n"; + strUsage += " -checkpoints " + _("Only accept block chain matching built-in checkpoints (default: 1)") + "\n"; + strUsage += " -listen " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n"; + strUsage += " -bind= " + _("Bind to given address and always listen on it. Use [host]:port notation for IPv6") + "\n"; + strUsage += " -dnsseed " + _("Find peers using DNS lookup (default: 1 unless -connect)") + "\n"; + strUsage += " -banscore= " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n"; + strUsage += " -bantime= " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n"; + strUsage += " -maxreceivebuffer= " + _("Maximum per-connection receive buffer, *1000 bytes (default: 5000)") + "\n"; + strUsage += " -maxsendbuffer= " + _("Maximum per-connection send buffer, *1000 bytes (default: 1000)") + "\n"; #ifdef USE_UPNP #if USE_UPNP - " -upnp " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n" + + strUsage += " -upnp " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n"; #else - " -upnp " + _("Use UPnP to map the listening port (default: 0)") + "\n" + + strUsage += " -upnp " + _("Use UPnP to map the listening port (default: 0)") + "\n"; #endif #endif - " -paytxfee= " + _("Fee per KB to add to transactions you send") + "\n" + + strUsage += " -paytxfee= " + _("Fee per KB to add to transactions you send") + "\n"; #ifdef QT_GUI - " -server " + _("Accept command line and JSON-RPC commands") + "\n" + + strUsage += " -server " + _("Accept command line and JSON-RPC commands") + "\n"; #endif #if !defined(WIN32) && !defined(QT_GUI) - " -daemon " + _("Run in the background as a daemon and accept commands") + "\n" + + strUsage += " -daemon " + _("Run in the background as a daemon and accept commands") + "\n"; #endif - " -testnet " + _("Use the test network") + "\n" + - " -debug " + _("Output extra debugging information. Implies all other -debug* options") + "\n" + - " -debugnet " + _("Output extra network debugging information") + "\n" + - " -logtimestamps " + _("Prepend debug output with timestamp") + "\n" + - " -shrinkdebugfile " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n" + - " -printtoconsole " + _("Send trace/debug info to console instead of debug.log file") + "\n" + + strUsage += " -testnet " + _("Use the test network") + "\n"; + strUsage += " -debug " + _("Output extra debugging information. Implies all other -debug* options") + "\n"; + strUsage += " -debugnet " + _("Output extra network debugging information") + "\n"; + strUsage += " -logtimestamps " + _("Prepend debug output with timestamp") + "\n"; + strUsage += " -shrinkdebugfile " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n"; + strUsage += " -printtoconsole " + _("Send trace/debug info to console instead of debug.log file") + "\n"; #ifdef WIN32 - " -printtodebugger " + _("Send trace/debug info to debugger") + "\n" + + strUsage += " -printtodebugger " + _("Send trace/debug info to debugger") + "\n"; #endif - " -rpcuser= " + _("Username for JSON-RPC connections") + "\n" + - " -rpcpassword= " + _("Password for JSON-RPC connections") + "\n" + - " -rpcport= " + _("Listen for JSON-RPC connections on (default: 8332 or testnet: 18332)") + "\n" + - " -rpcallowip= " + _("Allow JSON-RPC connections from specified IP address") + "\n" + + strUsage += " -rpcuser= " + _("Username for JSON-RPC connections") + "\n"; + strUsage += " -rpcpassword= " + _("Password for JSON-RPC connections") + "\n"; + strUsage += " -rpcport= " + _("Listen for JSON-RPC connections on (default: 8332 or testnet: 18332)") + "\n"; + strUsage += " -rpcallowip= " + _("Allow JSON-RPC connections from specified IP address") + "\n"; #ifndef QT_GUI - " -rpcconnect= " + _("Send commands to node running on (default: 127.0.0.1)") + "\n" + + strUsage += " -rpcconnect= " + _("Send commands to node running on (default: 127.0.0.1)") + "\n"; #endif - " -rpcthreads= " + _("Set the number of threads to service RPC calls (default: 4)") + "\n" + - " -blocknotify= " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n" + - " -walletnotify= " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n" + - " -alertnotify= " + _("Execute command when a relevant alert is received (%s in cmd is replaced by message)") + "\n" + - " -upgradewallet " + _("Upgrade wallet to latest format") + "\n" + - " -keypool= " + _("Set key pool size to (default: 100)") + "\n" + - " -rescan " + _("Rescan the block chain for missing wallet transactions") + "\n" + - " -salvagewallet " + _("Attempt to recover private keys from a corrupt wallet.dat") + "\n" + - " -checkblocks= " + _("How many blocks to check at startup (default: 288, 0 = all)") + "\n" + - " -checklevel= " + _("How thorough the block verification is (0-4, default: 3)") + "\n" + - " -txindex " + _("Maintain a full transaction index (default: 0)") + "\n" + - " -loadblock= " + _("Imports blocks from external blk000??.dat file") + "\n" + - " -reindex " + _("Rebuild block chain index from current blk000??.dat files") + "\n" + - " -par= " + _("Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)") + "\n" + + strUsage += " -rpcthreads= " + _("Set the number of threads to service RPC calls (default: 4)") + "\n"; + strUsage += " -blocknotify= " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n"; + strUsage += " -walletnotify= " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n"; + strUsage += " -alertnotify= " + _("Execute command when a relevant alert is received (%s in cmd is replaced by message)") + "\n"; + strUsage += " -upgradewallet " + _("Upgrade wallet to latest format") + "\n"; + strUsage += " -keypool= " + _("Set key pool size to (default: 100)") + "\n"; + strUsage += " -rescan " + _("Rescan the block chain for missing wallet transactions") + "\n"; + strUsage += " -salvagewallet " + _("Attempt to recover private keys from a corrupt wallet.dat") + "\n"; + strUsage += " -checkblocks= " + _("How many blocks to check at startup (default: 288, 0 = all)") + "\n"; + strUsage += " -checklevel= " + _("How thorough the block verification is (0-4, default: 3)") + "\n"; + strUsage += " -txindex " + _("Maintain a full transaction index (default: 0)") + "\n"; + strUsage += " -loadblock= " + _("Imports blocks from external blk000??.dat file") + "\n"; + strUsage += " -reindex " + _("Rebuild block chain index from current blk000??.dat files") + "\n"; + strUsage += " -par= " + _("Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)") + "\n"; - "\n" + _("Block creation options:") + "\n" + - " -blockminsize= " + _("Set minimum block size in bytes (default: 0)") + "\n" + - " -blockmaxsize= " + _("Set maximum block size in bytes (default: 250000)") + "\n" + - " -blockprioritysize= " + _("Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)") + "\n" + + strUsage += "\n"; _("Block creation options:") + "\n"; + strUsage += " -blockminsize= " + _("Set minimum block size in bytes (default: 0)") + "\n"; + strUsage += " -blockmaxsize= " + _("Set maximum block size in bytes (default: 250000)") + "\n"; + strUsage += " -blockprioritysize= " + _("Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)") + "\n"; - "\n" + _("SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n" + - " -rpcssl " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n" + - " -rpcsslcertificatechainfile= " + _("Server certificate file (default: server.cert)") + "\n" + - " -rpcsslprivatekeyfile= " + _("Server private key (default: server.pem)") + "\n" + - " -rpcsslciphers= " + _("Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)") + "\n"; + strUsage += "\n"; _("SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n"; + strUsage += " -rpcssl " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n"; + strUsage += " -rpcsslcertificatechainfile= " + _("Server certificate file (default: server.cert)") + "\n"; + strUsage += " -rpcsslprivatekeyfile= " + _("Server private key (default: server.pem)") + "\n"; + strUsage += " -rpcsslciphers= " + _("Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)") + "\n"; return strUsage; }