Skip to content

Commit 06eb2f2

Browse files
committed
Seperate out wallet options in help message
Seperate out the wallet options in HelpMessage, and don't show them if compiled with --disable-wallet. Also add documentation for `-disablewallet` option.
1 parent 3d7c66d commit 06eb2f2

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/init.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,8 @@ std::string HelpMessage(HelpMessageMode hmm)
194194
strUsage += " -conf=<file> " + _("Specify configuration file (default: bitcoin.conf)") + "\n";
195195
strUsage += " -datadir=<dir> " + _("Specify data directory") + "\n";
196196
strUsage += " -testnet " + _("Use the test network") + "\n";
197-
198197
strUsage += " -pid=<file> " + _("Specify pid file (default: bitcoind.pid)") + "\n";
199198
strUsage += " -gen " + _("Generate coins (default: 0)") + "\n";
200-
strUsage += " -wallet=<file> " + _("Specify wallet file (within data directory)") + "\n";
201199
strUsage += " -dbcache=<n> " + _("Set database cache size in megabytes (default: 25)") + "\n";
202200
strUsage += " -timeout=<n> " + _("Specify connection timeout in milliseconds (default: 5000)") + "\n";
203201
strUsage += " -proxy=<ip:port> " + _("Connect through SOCKS proxy") + "\n";
@@ -227,7 +225,6 @@ std::string HelpMessage(HelpMessageMode hmm)
227225
strUsage += " -upnp " + _("Use UPnP to map the listening port (default: 0)") + "\n";
228226
#endif
229227
#endif
230-
strUsage += " -paytxfee=<amt> " + _("Fee per kB to add to transactions you send") + "\n";
231228
strUsage += " -debug=<category> " + _("Output debugging information (default: 0, supplying <category> is optional)") + "\n";
232229
strUsage += _("If <category> is not supplied, output all debugging information.") + "\n";
233230
strUsage += _("<category> can be:");
@@ -264,23 +261,27 @@ std::string HelpMessage(HelpMessageMode hmm)
264261
strUsage += " -rpcuser=<user> " + _("Username for JSON-RPC connections") + "\n";
265262
strUsage += " -rpcpassword=<pw> " + _("Password for JSON-RPC connections") + "\n";
266263
strUsage += " -rpcport=<port> " + _("Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)") + "\n";
267-
268264
strUsage += " -rpcallowip=<ip> " + _("Allow JSON-RPC connections from specified IP address") + "\n";
269265
strUsage += " -rpcthreads=<n> " + _("Set the number of threads to service RPC calls (default: 4)") + "\n";
270266
strUsage += " -blocknotify=<cmd> " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n";
271-
strUsage += " -walletnotify=<cmd> " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
272267
strUsage += " -alertnotify=<cmd> " + _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)") + "\n";
273-
strUsage += " -upgradewallet " + _("Upgrade wallet to latest format") + "\n";
274268
strUsage += " -keypool=<n> " + _("Set key pool size to <n> (default: 100)") + "\n";
275-
strUsage += " -rescan " + _("Rescan the block chain for missing wallet transactions") + "\n";
276-
strUsage += " -salvagewallet " + _("Attempt to recover private keys from a corrupt wallet.dat") + "\n";
277269
strUsage += " -checkblocks=<n> " + _("How many blocks to check at startup (default: 288, 0 = all)") + "\n";
278270
strUsage += " -checklevel=<n> " + _("How thorough the block verification is (0-4, default: 3)") + "\n";
279271
strUsage += " -txindex " + _("Maintain a full transaction index (default: 0)") + "\n";
280272
strUsage += " -loadblock=<file> " + _("Imports blocks from external blk000??.dat file") + "\n";
281273
strUsage += " -reindex " + _("Rebuild block chain index from current blk000??.dat files") + "\n";
282274
strUsage += " -par=<n> " + _("Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)") + "\n";
283-
275+
#ifdef ENABLE_WALLET
276+
strUsage += "\n" + _("Wallet options:") + "\n";
277+
strUsage += " -disablewallet " + _("Do not load the wallet and disable wallet RPC calls") + "\n";
278+
strUsage += " -paytxfee=<amt> " + _("Fee per kB to add to transactions you send") + "\n";
279+
strUsage += " -rescan " + _("Rescan the block chain for missing wallet transactions") + "\n";
280+
strUsage += " -salvagewallet " + _("Attempt to recover private keys from a corrupt wallet.dat") + "\n";
281+
strUsage += " -upgradewallet " + _("Upgrade wallet to latest format") + "\n";
282+
strUsage += " -wallet=<file> " + _("Specify wallet file (within data directory)") + "\n";
283+
strUsage += " -walletnotify=<cmd> " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
284+
#endif
284285
strUsage += "\n" + _("Block creation options:") + "\n";
285286
strUsage += " -blockminsize=<n> " + _("Set minimum block size in bytes (default: 0)") + "\n";
286287
strUsage += " -blockmaxsize=<n> " + strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE) + "\n";

0 commit comments

Comments
 (0)