test: move more utility functions into test utility library #17593

pull mzumsande wants to merge 3 commits into bitcoin:master from mzumsande:201911_test_moveutil changing 12 files +135 −113
  1. mzumsande commented at 1:35 PM on November 25, 2019: member

    This disbands test/util.h and test/util.cpp and moves the content into the test utility library recently created in #17542, so that all test utility functions are in one place.

    The content of the original files are split into three modules:

    1. string helper functions go to test/util/str
    2. mining helper functions go to the newly created test/util/mining
    3. wallet helper functions go to the newly created test/util/wallet
  2. [test] move string helper functions into test library 2cb4e8bdc7
  3. fanquake added the label Tests on Nov 25, 2019
  4. in src/Makefile.test_util.include:13 in 3b50882ac9 outdated
       9 | @@ -10,22 +10,25 @@ EXTRA_LIBRARIES += \
      10 |  TEST_UTIL_H = \
      11 |      test/util/blockfilter.h \
      12 |      test/util/logging.h \
      13 | +    test/util/mining_utils.h \
    


    MarcoFalke commented at 1:41 PM on November 25, 2019:

    I think we do without the _utils suffix. No strong opinion, though.


    mzumsande commented at 1:54 PM on November 25, 2019:

    I used the suffix because we already have wallet.h twice. No strong opinion either though, so I am happy to change it after the CIs are through.


    MarcoFalke commented at 2:06 PM on November 25, 2019:

    Yeah, we use the include guards e.g. BITCOIN_TEST_UTIL_WALLET_UTILS_H to protect against duplicate includes and the <> import to protect against including the wrong path. So it should be fine to have three wallet.h

    The travis CI passed and the appveyor ci is failing on master currently, so no need to wait for that.


    mzumsande commented at 3:44 PM on November 25, 2019:

    Ok, I renamed and rebased. As to move-only, note that I removed one include from util.cpp (validationinterface) that I could not allocate to any of the helper functions.

  5. MarcoFalke approved
  6. MarcoFalke commented at 1:42 PM on November 25, 2019: member

    Concept ACK

    Will check if it is move-only and then merge

  7. mzumsande force-pushed on Nov 25, 2019
  8. [test] move mining helper functions into test library f613e5dfda
  9. [test] move wallet helper functions into test library 78e283e656
  10. mzumsande force-pushed on Nov 25, 2019
  11. DrahtBot commented at 5:13 PM on November 25, 2019: 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:

    • #17577 (refactor: deduplicate the message sign/verify code by vasild)
    • #17529 (rpc: Faster getblock using PureBlock by MarcoFalke)
    • #17261 (Make ScriptPubKeyMan an actual interface and the wallet to have multiple by achow101)
    • #16895 (External signer multisig support by Sjors)
    • #16549 ([WIP] UI external signer support (e.g. hardware wallet) by Sjors)
    • #16546 ([WIP] External signer support - Wallet Box edition by Sjors)
    • #16528 ([WIP] Native Descriptor Wallets (take 2) by achow101)

    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.

  12. MarcoFalke commented at 8:31 PM on December 16, 2019: member

    re-run ci

  13. MarcoFalke closed this on Dec 16, 2019

  14. MarcoFalke reopened this on Dec 16, 2019

  15. MarcoFalke commented at 8:35 PM on December 16, 2019: member

    ACK 78e283e656bf1643944ffdb76185f3468eb25895 🔧

    <details><summary>Show signature and timestamp</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK 78e283e656bf1643944ffdb76185f3468eb25895 🔧
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUhXugwAiNka9evoq5MuT3W5Ib7SLMkapw1JkjvxcETUHUMq3hMnk+2WiuFfmRxf
    qEjmc2IUA9kTH2CL1Ngw4sbuWnRz2zFcieKOId+vKsoIMVr4FJNxo0tORKxkmLDe
    MI5XCp5noDfxFIrRhncLmkRGd1S1Db+FnIJ0F7hG7cGmMbl39ssCWzs0wsgDzFJ7
    foqpxVATjZkZ5/JrezVsuK8qiTBrN6l51SrLR/nbtTp5hj19+TTLQtk8sLzn/ag4
    nZISRt/RWHKBIWpBHnslo1JJseor4aSTZ5mFAhxVZJYdVIbZ0D4ua3qSz2/7WqR0
    Er44Gcvg+BE3AJakWhx95auYJROEFSi098esvNPnV+ohd/B9KfOW0D5gNF3Z197O
    MqwlyzLP8Mn4uj6KR84DbsTiv/8Ar2h/W8myYLAkVZi+kGJfK7iGHJgZFN17Se4I
    yIM19q9Nw/P+zov+D7qyIGtH7PB02V/0WgOZLExoAaz0J8w0VvCIwYQVbHLf+T2b
    oLjCSAMw
    =z7fO
    -----END PGP SIGNATURE-----
    

    Timestamp of file with hash df008b0bfc32c089f1a8ac572a47cc0b398871e23167462a94b37edecd61e010 -

    </details>

  16. MarcoFalke referenced this in commit 94c6f2bba4 on Dec 16, 2019
  17. MarcoFalke merged this on Dec 16, 2019
  18. MarcoFalke closed this on Dec 16, 2019

  19. sidhujag referenced this in commit d566bad3b3 on Dec 16, 2019
  20. mzumsande deleted the branch on May 10, 2020
  21. deadalnix referenced this in commit 0ca5b97c4a on Sep 1, 2020
  22. deadalnix referenced this in commit a478fd286a on Sep 1, 2020
  23. jasonbcox referenced this in commit a19199ab0b on Sep 1, 2020
  24. sidhujag referenced this in commit d346a17938 on Nov 10, 2020
  25. DrahtBot locked this on Feb 15, 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-17 03:14 UTC

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