improve command-line options output #3619

pull cozz wants to merge 1 commits into bitcoin:master from cozz:cozz4 changing 3 files +94 −64
  1. cozz commented at 6:58 AM on February 3, 2014: contributor
    • 3 new categories
      • Connection options
      • Testing options
      • RPC server options
    • rename "SSL options" to "RPC SSL options"
    • append "on startup" to
      • checklevel
      • loadblock
      • reindex
      • rescan
      • salvagewallet
      • upgradewallet
    • Fix rpcuser and rpcpassword appeared twice for bitcoind in rpcclient.cpp
  2. in src/init.cpp:None in d46ba0550f outdated
     249 | +    strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format on startup") + "\n";
     250 | +    strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + "\n";
     251 | +    strUsage += "  -walletnotify=<cmd>    " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
     252 | +#endif
     253 | +
     254 | +    strUsage += "\n" + _("Testing options:") + "\n";
    


    Diapolo commented at 7:14 AM on February 3, 2014:

    I don't like Testing options:, for that logging stuff.


    cozz commented at 7:52 AM on February 3, 2014:

    How about Testing/Debug options? What would you suggest?


    Diapolo commented at 12:43 PM on February 3, 2014:

    Debugging/Testing options: sounds okay.

  3. Diapolo commented at 7:15 AM on February 3, 2014: none

    Perhaps this is also a good time to sort them alphabetically for each category? At least when options don't belong together directly...

  4. in src/init.cpp:None in d46ba0550f outdated
     202 | +    strUsage += "  -blocknotify=<cmd>     " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n";
     203 | +    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";
     204 | +    strUsage += "  -checkblocks=<n>       " + _("How many blocks to check at startup (default: 288, 0 = all)") + "\n";
     205 | +    strUsage += "  -checklevel=<n>        " + _("How thorough the block verification at startup is (0-4, default: 3)") + "\n";
     206 | +    strUsage += "  -txindex               " + _("Maintain a full transaction index (default: 0)") + "\n";
     207 | +    strUsage += "  -loadblock=<file>      " + _("Imports blocks from external blk000??.dat file on startup") + "\n";
    


    Diapolo commented at 12:44 PM on February 3, 2014:

    If on startup could just be appended to the current string, we would prevent the need for a complete re-translation of that string via Transifex.

  5. cozz commented at 1:51 AM on February 4, 2014: contributor

    update:

    • rename "Testing" to "Debugging/Testing"
    • sort alphabetically
    • append "on startup" in separate string
    • add default values to -dns and -wallet
    • Description of -checklevel now is "How thorough the block verification of -checkblocks is (0-4, default: 3)" before it was "How thorough the block verification is (0-4, default: 3)"

    usage2

  6. cozz commented at 2:07 PM on February 4, 2014: contributor

    Seems like the following Debugging/Testing options are undocumented: -benchmark -dblogsize -disablesafemode -testsafemode -dropmessagestest -fuzzmessagestest -flushwallet -genproclimit -limitfreerelay -maxsigcachesize -mintxfee -minrelayfee -rootcertificates -printblock -printblocktree -privdb

    Does it make sense to include them all in the --help output? I thought maybe hide those expert-only Debugging/Testing by default, and then make a --helpdebug to show all the Debugging/Testing options?

    Also -checkpoints and -regtest would fall into this category.

  7. laanwj commented at 2:45 PM on February 4, 2014: member

    Most of those are not documented in the --help output on purpose. Accidental use of some of those options can result in performance issues or even getting banned by other nodes.

    Adding a special --help-debug would be a possibility.

    Though these should probably be documented in the normal options:

    -mintxfee
    -minrelaytxfee (minrelayfee doesn't exist)
    -genproclimit (part of internal miner)
    -rootcertificates (GUI only)
    
  8. cozz commented at 6:12 AM on February 5, 2014: contributor

    update:

    added to GUI: -rootcertificates=&lt;file&gt; Set SSL root certificates for payment request (default: -system-)

    and to Debugging/Testing: -benchmark Show benchmark information (default: 0) -dblogsize=&lt;n&gt; Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100) -disablesafemode Disable safemode, override a real safe mode event (default: 0) -testsafemode Force safe mode (default: 0) -dropmessagestest=&lt;n&gt; Randomly drop 1 of every &lt;n&gt; network messages -fuzzmessagestest=&lt;n&gt; Randomly fuzz 1 of every &lt;n&gt; network messages -flushwallet Run a thread to flush wallet periodically (default: 1) -genproclimit=&lt;n&gt; Set the processor limit for when generation is on (-1 = unlimited, default: -1) -help-debug Show all debugging options (usage: --help -help-debug) -limitfreerelay=&lt;n&gt; Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15) -maxsigcachesize=&lt;n&gt; Limit size of signature cache to &lt;n&gt; entries (default: 50000) -mintxfee=&lt;amt&gt; Fees smaller than this are considered zero fee (for transaction creation) (default: CTransaction::nMinTxFee) -minrelaytxfee=&lt;amt&gt; Fees smaller than this are considered zero fee (for relaying) (default: CTransaction::nMinRelayTxFee) -printblock=&lt;hash&gt; Print block on startup, if found in block index -printblocktree Print block tree on startup (default: 0) -privdb Sets the DB_PRIVATE flag in the wallet db environment (default: 1)

    So Debugging/Testing section for "--help" now looks like this usage4

    and for "--help -help-debug" usage5

  9. laanwj commented at 2:21 PM on February 9, 2014: member

    BTW the reason for rpcuser and rpcpass to appear twice in bitcoind output was because they have effect on both the RPC server and RPC client. Also listing them under the client options makes it clear that they can be used there as well. Not that I insist on that, listing them only once is fine with me and saves some space.

  10. cozz commented at 3:26 PM on February 9, 2014: contributor

    So I fixed a bug that is supposed to be a feature.

  11. laanwj commented at 10:17 AM on March 25, 2014: member

    Needs rebase

  12. improve command-line options output 7398f4a796
  13. cozz commented at 12:39 PM on March 25, 2014: contributor

    rebased. I went through the history of init.cpp, to make sure I did not miss anything.

  14. BitcoinPullTester commented at 1:06 PM on March 25, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/7398f4a796522f896ccc65b2e9adb109e9346020 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  15. laanwj referenced this in commit 410c2fa317 on Mar 27, 2014
  16. laanwj merged this on Mar 27, 2014
  17. laanwj closed this on Mar 27, 2014

  18. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me