refactor: Rename JoinErrors and re-use it #22653

pull hebasto wants to merge 3 commits into bitcoin:master from hebasto:210806-err changing 4 files +18 −13
  1. hebasto commented at 7:09 PM on August 6, 2021: member

    A nice JoinErrors utility function was introduced in https://github.com/bitcoin-core/gui/pull/379 by Russell Yanofsky.

    This PR renames this function and re-uses it across the code base.

  2. scripted-diff: Rename JoinErrors in more general MakeUnorderedList
    -BEGIN VERIFY SCRIPT-
    sed -i -e 's/JoinErrors/MakeUnorderedList/' -- src/qt/bitcoin.cpp
    -END VERIFY SCRIPT-
    6a5ccd65c7
  3. refactor: Move MakeUnorderedList into util/string.h to make it reusable 77a90f03ac
  4. refactor: Reuse MakeUnorderedList where possible bb56486a17
  5. hebasto commented at 7:10 PM on August 6, 2021: member
  6. hebasto added the label Refactoring on Aug 6, 2021
  7. theStack commented at 8:20 PM on August 6, 2021: member

    Concept ACK

  8. DrahtBot commented at 5:01 AM on August 7, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #22664 (docs: fix typo spelling grammar by slowy07)
    • #20295 (rpc: getblockfrompeer by Sjors)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  9. Zero-1729 commented at 8:24 AM on August 7, 2021: contributor

    Concept ACK bb56486a170aacb355f4a973f0cd40ab3918a0cd

  10. theStack approved
  11. theStack commented at 4:26 PM on August 9, 2021: member

    Code-review ACK bb56486a170aacb355f4a973f0cd40ab3918a0cd

  12. Talkless approved
  13. Talkless commented at 5:25 PM on August 10, 2021: none

    utACK bb56486a170aacb355f4a973f0cd40ab3918a0cd

  14. hebasto requested review from ryanofsky on Aug 10, 2021
  15. in src/rpc/blockchain.cpp:1331 in bb56486a17
    1328 | @@ -1328,7 +1329,7 @@ static RPCHelpMan verifychain()
    1329 |                  "\nVerifies blockchain database.\n",
    1330 |                  {
    1331 |                      {"checklevel", RPCArg::Type::NUM, RPCArg::DefaultHint{strprintf("%d, range=0-4", DEFAULT_CHECKLEVEL)},
    1332 | -                        strprintf("How thorough the block verification is:\n - %s", Join(CHECKLEVEL_DOC, "\n- "))},
    


    ryanofsky commented at 8:10 PM on August 10, 2021:

    In commit "refactor: Reuse MakeUnorderedList where possible" (bb56486a170aacb355f4a973f0cd40ab3918a0cd)

    This looks good but just want to note small change in behavior here: space is removed before the first "-"


    hebasto commented at 8:33 PM on August 10, 2021:

    Yes. While working on this PR I was wondering what is the purpose of a space before the first "-" :)

    It seems ignored:

    $ src/bitcoin-cli --version
    Bitcoin Core RPC client version v22.99.0-bb56486a170a
    $ src/bitcoin-cli help verifychain > ~/pr
    $ src/bitcoin-cli --version
    Bitcoin Core RPC client version v22.99.0-03826aecc56c
    $ src/bitcoin-cli help verifychain > ~/master
    $ diff ~/master ~/pr  # empty
    
  16. ryanofsky approved
  17. ryanofsky commented at 8:12 PM on August 10, 2021: member

    Code review ACK bb56486a170aacb355f4a973f0cd40ab3918a0cd. Nice deduping, thanks for this!

  18. fanquake merged this on Aug 11, 2021
  19. fanquake closed this on Aug 11, 2021

  20. hebasto deleted the branch on Aug 11, 2021
  21. sidhujag referenced this in commit 74d0015b6b on Aug 15, 2021
  22. DrahtBot locked this on Aug 18, 2022

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-22 06:14 UTC

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