test: restore assertion that tx contains exactly 2500 sigops #35328

pull ismaelsadeeq wants to merge 1 commits into bitcoin:master from ismaelsadeeq:05-2025-assert-tx-contains-2500-sigops changing 1 files +1 −0
  1. ismaelsadeeq commented at 9:53 AM on May 20, 2026: member

    darosior wrote #29060 (review):

    This is useful documentation, plus useful in making sure the comment above the check does not become stale or incorrect.

    Hence reverted.

  2. test: restore assertion that tx contains exactly 2500 sigops
    Co-authored-by: Antoine Poinsot <darosior@protonmail.com>
    ae73b69b52
  3. DrahtBot added the label Tests on May 20, 2026
  4. DrahtBot commented at 9:53 AM on May 20, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35328.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK sedited, l0rinc, willcl-ark

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. sedited approved
  6. sedited commented at 9:56 AM on May 20, 2026: contributor

    ACK ae73b69b5272ce69a409eeae9bf77222b23260a7

  7. sedited requested review from darosior on May 20, 2026
  8. in src/test/transaction_tests.cpp:1092 in ae73b69b52
    1088 | @@ -1089,6 +1089,7 @@ BOOST_AUTO_TEST_CASE(max_standard_legacy_sigops)
    1089 |      AddCoins(coins, CTransaction(tx_create_p2pk), 0, false);
    1090 |  
    1091 |      // The transaction now contains exactly 2500 sigops, the check should pass.
    1092 | +    BOOST_CHECK_EQUAL(p2sh_inputs_count * MAX_P2SH_SIGOPS + p2pk_inputs_count * 1, MAX_TX_LEGACY_SIGOPS);
    


    l0rinc commented at 9:58 AM on May 20, 2026:

    Is the * 1 meant to document something here?


    ismaelsadeeq commented at 10:19 AM on May 20, 2026:

    Yes, for completeness. It won't hurt to make it implicit and remove the * 1 there. But that is beyond the scope of this simple PR I am just reverting the unintended regression.

  9. l0rinc commented at 10:42 AM on May 20, 2026: contributor

    code review ACK ae73b69b5272ce69a409eeae9bf77222b23260a7

    Cleanly reverts the affected line

  10. willcl-ark approved
  11. willcl-ark commented at 12:06 PM on May 20, 2026: member

    ACK ae73b69b5272ce69a409eeae9bf77222b23260a7

  12. fanquake merged this on May 20, 2026
  13. fanquake closed this on May 20, 2026

  14. ismaelsadeeq deleted the branch on May 20, 2026

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-05-22 20:51 UTC

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