test: removes unnecessary check from validation_tests #29516

pull sr-gi wants to merge 1 commits into bitcoin:master from sr-gi:2024-02-29-mutated-blocs-test changing 1 files +0 −1
  1. sr-gi commented at 3:01 PM on February 29, 2024: member

    An unnecessary check was added to the block mutation tests in #29412 where IsBlockMutated is returning true for the invalid reasons: we try to check mutation via transaction duplication, but the merkle root is not updated before the check, therefore the check fails because the provided root and the computed root differ, but not because the block contains the same transaction twice.

    Notice that a proper check to test the duplication case is added a few lines later, so this check is just meaningless and can be removed. Check #29412 (review) for context.

  2. test: removes unnecessary check from validation_tests
    An unnecessary check was added to the block mutation tests
    in #29412 where IsBlockMutated is returning true for the invalid
    reasons: we try to check mutation via transaction duplication,
    but the merkle root is not updated before the check, therefore
    the check fails because the provided root and the computed root
    differ, but not because the block contains the same transaction twice.
    
    The check is meaningless so it can be removed.
    6ee3997d03
  3. DrahtBot commented at 3:01 PM on February 29, 2024: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK dergoegge, 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 Feb 29, 2024
  5. sr-gi commented at 3:02 PM on February 29, 2024: member
  6. dergoegge approved
  7. dergoegge commented at 3:03 PM on February 29, 2024: member

    utACK 6ee3997d03e456655e3c44abf1e15270c423ed41

  8. maflcko commented at 3:16 PM on February 29, 2024: member

    ACK 6ee3997d03e456655e3c44abf1e15270c423ed41

  9. BrandonOdiwuor approved
  10. BrandonOdiwuor commented at 5:42 PM on February 29, 2024: contributor

    utACK 6ee3997d03e456655e3c44abf1e15270c423ed41

  11. fanquake merged this on Feb 29, 2024
  12. fanquake closed this on Feb 29, 2024

  13. bitcoin locked this on Feb 28, 2025

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 09:13 UTC

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