test: remove unused code from script_tests #31051

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:dead_code_script_tests changing 1 files +0 −1
  1. fanquake commented at 3:35 pm on October 7, 2024: member

    This has been unused since #29648. Noticed while running a newer version of clang-tidy (19.1.1):

    0[127/391][6.2s] /opt/homebrew/opt/llvm/bin/clang-tidy -p=build -quiet --config-file=/bitcoin/src/.clang-tidy /bitcoin/src/test/script_tests.cpp
    1bitcoin/src/test/script_tests.cpp:126:25: error: local copy 'tx2' of the variable 'tx' is never modified and never used; consider removing the statement [performance-unnecessary-copy-initialization,-warnings-as-errors]
    2  126 |     CMutableTransaction tx2 = tx;
    3      |     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
    4  127 |     BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, &scriptWitness, flags, MutableTransactionSignatureChecker(&tx, 0, txCredit.vout[0].nValue, MissingDataBehavior::ASSERT_FAIL), &err) == expect, message);
    5512 warnings generated.
    
  2. test: remove unused code from script_tests
    This has been unused since #29648.
    Noticed while running a newer version of clang-tidy (19.1.1):
    ```bash
    [127/391][6.2s] /opt/homebrew/opt/llvm/bin/clang-tidy -p=build -quiet --config-file=/bitcoin/src/.clang-tidy /bitcoin/src/test/script_tests.cpp
    bitcoin/src/test/script_tests.cpp:126:25: error: local copy 'tx2' of the variable 'tx' is never modified and never used; consider removing the statement [performance-unnecessary-copy-initialization,-warnings-as-errors]
      126 |     CMutableTransaction tx2 = tx;
          |     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
      127 |     BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, &scriptWitness, flags, MutableTransactionSignatureChecker(&tx, 0, txCredit.vout[0].nValue, MissingDataBehavior::ASSERT_FAIL), &err) == expect, message);
    512 warnings generated.
    ```
    e0287bc4b2
  3. DrahtBot commented at 3:35 pm on October 7, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, BrandonOdiwuor

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

  4. DrahtBot added the label Tests on Oct 7, 2024
  5. maflcko commented at 3:46 pm on October 7, 2024: member
    review ACK e0287bc4b2d83cefb7af48aef457153d0729bcd4
  6. DrahtBot commented at 4:42 pm on October 7, 2024: contributor

    🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/31183918967

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  7. DrahtBot added the label CI failed on Oct 7, 2024
  8. BrandonOdiwuor approved
  9. BrandonOdiwuor commented at 6:54 pm on October 7, 2024: contributor
    ACK e0287bc4b2d83cefb7af48aef457153d0729bcd4
  10. DrahtBot removed the label CI failed on Oct 8, 2024
  11. fanquake merged this on Oct 8, 2024
  12. fanquake closed this on Oct 8, 2024

  13. fanquake deleted the branch on Oct 8, 2024

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: 2024-12-26 12:12 UTC

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