Modify command line help to show support for BIP21 URIs #752

pull hernanmarino wants to merge 1 commits into bitcoin-core:master from hernanmarino:update-help-BIP21-URI changing 1 files +2 −1
  1. hernanmarino commented at 11:03 pm on September 8, 2023: contributor

    While reviewing a different PR (see #742 ) hebasto suggested that the help for bitcoin-qt should be updated to reflect the fact that bitcoin-qt supports an optional BIP21 URI parameter.

    Since this reflects actual behaviour of bitcoin-qt and is independent of whether or not the other PR gets merged, I created this simple PR to fix the help message.

  2. DrahtBot commented at 11:03 pm on September 8, 2023: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK kristapsk, pablomartin4btc, hebasto
    Concept ACK RandyMcMillan
    Stale ACK jarolrod

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  3. RandyMcMillan commented at 11:01 am on September 9, 2023: contributor
    concept ACK
  4. jarolrod approved
  5. jarolrod commented at 6:17 am on September 12, 2023: member
    ACK b45658ad093b61e92e9b2edbfb7003bf544e52ab
  6. in src/qt/utilitydialog.cpp:61 in b45658ad09 outdated
    57@@ -58,7 +58,8 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
    58         ui->helpMessage->setVisible(false);
    59     } else {
    60         setWindowTitle(tr("Command-line options"));
    61-        QString header = "Usage:  bitcoin-qt [command-line options]                     \n";
    62+        QString header = "Usage:  bitcoin-qt [command-line options] [BIP21 URI]                     \n\n"
    


    luke-jr commented at 4:07 pm on September 12, 2023:
    What is the purpose of these extra spaces on the end? Do they need to be adjusted? Can’t seem to figure it out from the git history either :/

    luke-jr commented at 4:08 pm on September 12, 2023:
    Probably better to just leave it as [URI] here, and if BIP21 is mentioned, only do so in the explanation below.

    pablomartin4btc commented at 1:21 am on September 15, 2023:

    I think it can be removed, it doesn’t make any difference. I couldn’t find any other reference in the code of such a thing (extra spaces at the end of a line before an \n). I think it was some formatting logic left behind.

    Regarding its historical origins, it seems that it was coming from the bitcoind/ bitcoin-cli helps and copied over (#13872). You can still see it at some places (exactly the same 22 spaces): image


    pablomartin4btc commented at 1:25 am on September 15, 2023:

    Why not the complete syntax representation of the BIP21 command?

    0 bitcoinurn     = "bitcoin:" bitcoinaddress [ "?" bitcoinparams ]
    1 bitcoinaddress = *base58
    2 bitcoinparams  = bitcoinparam [ "&" bitcoinparams ]
    3 bitcoinparam   = [ amountparam / labelparam / messageparam / otherparam / reqparam ]
    4 amountparam    = "amount=" *digit [ "." *digit ]
    5 labelparam     = "label=" *qchar
    6 messageparam   = "message=" *qchar
    7 otherparam     = qchar *qchar [ "=" *qchar ]
    8 reqparam       = "req-" qchar *qchar [ "=" *qchar ]
    

    pablomartin4btc commented at 1:38 am on September 15, 2023:

    Also, I’d remove 1 space after “Usage:”, so the start of “bitcoind” matches the alignment of the options helps.

    0        QString header = "Usage: bitcoin-qt [command-line options] [BIP21 URI]                     \n\n"
    

    hernanmarino commented at 6:21 pm on October 10, 2023:
    @pablomartin4btc I think this is not the place to explain BIP21, and I’ll follow @luke-jr ’s advice on this one.

    hernanmarino commented at 6:45 pm on October 10, 2023:
    I agree with @luke-jr and @pablomartin4btc , I ll remove the extra spaces at the end, I see no reason to leave them. Regarding the help2man tool mentioned in https://github.com/bitcoin/bitcoin/pull/13872 , there is no reason for extra spaces.
  7. pablomartin4btc commented at 1:41 am on September 15, 2023: contributor

    tested ACK.

    image

    Added some obs on @luke-jr’s comments.

  8. hernanmarino force-pushed on Oct 10, 2023
  9. hernanmarino commented at 6:56 pm on October 10, 2023: contributor
    Updated to address @luke-jr and @pablomartin4btc
  10. pablomartin4btc approved
  11. pablomartin4btc commented at 7:33 pm on October 10, 2023: contributor
    re ACK
  12. DrahtBot added the label CI failed on Nov 10, 2023
  13. DrahtBot removed the label CI failed on Nov 10, 2023
  14. DrahtBot cross-referenced this on Nov 14, 2023 from issue getrawtransaction implementation by BrandonOdiwuor
  15. in src/qt/utilitydialog.cpp:62 in 07bb7068cf outdated
    57@@ -58,7 +58,8 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
    58         ui->helpMessage->setVisible(false);
    59     } else {
    60         setWindowTitle(tr("Command-line options"));
    61-        QString header = "Usage:  bitcoin-qt [command-line options]                     \n";
    62+        QString header = "Usage: bitcoin-qt [command-line options] [URI]\n\n"
    63+                         "Optional [URI] is a bitcoin address in BIP21 URI format.\n";
    


    luke-jr commented at 6:51 pm on November 24, 2023:
    Bitcoin should be capitalized here

    kristapsk commented at 5:03 pm on December 27, 2023:

    Square brackets mean that URI option is optional. Either use “[URI]” or “Optional URI” below, not “Optional [URI]”.

    0                         "Optional URI is a bitcoin address in BIP21 URI format.\n";
    

    hernanmarino commented at 3:47 am on February 1, 2024:
    Done

    hernanmarino commented at 3:47 am on February 1, 2024:
    Done
  16. DrahtBot added the label CI failed on Jan 14, 2024
  17. hernanmarino force-pushed on Feb 1, 2024
  18. Modify command line help to show support for BIP21 URIs ede5014c44
  19. hernanmarino force-pushed on Feb 1, 2024
  20. hernanmarino commented at 3:58 am on February 1, 2024: contributor
    Fixed the 2 typos mentioned by @luke-jr and @kristapsk . Also rebased for CI.
  21. DrahtBot removed the label CI failed on Feb 1, 2024
  22. MarnixCroes approved
  23. MarnixCroes commented at 9:09 am on February 1, 2024: contributor
    ack ede5014c445dcb40ddcfdede2c51236bbfe85f5e
  24. kristapsk approved
  25. kristapsk commented at 11:07 am on February 1, 2024: contributor
    utACK ede5014c445dcb40ddcfdede2c51236bbfe85f5e
  26. DrahtBot requested review from pablomartin4btc on Feb 1, 2024
  27. DrahtBot requested review from jarolrod on Feb 1, 2024
  28. pablomartin4btc commented at 5:48 pm on February 1, 2024: contributor
    lgtm, re ACK ede5014c445dcb40ddcfdede2c51236bbfe85f5e
  29. hebasto approved
  30. hebasto commented at 10:25 pm on February 11, 2024: member
    ACK ede5014c445dcb40ddcfdede2c51236bbfe85f5e.
  31. hebasto merged this on Feb 11, 2024
  32. hebasto closed this on Feb 11, 2024


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 09:20 UTC

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