test: remove unnecessary block rehashing prior to solving #23498

pull theStack wants to merge 1 commits into bitcoin:master from theStack:202111-test-remove_superflous_block_rehashs_before_solving changing 11 files +0 −20
  1. theStack commented at 5:43 PM on November 12, 2021: member

    Solving a block involves continously rehashing it,

    https://github.com/bitcoin/bitcoin/blob/c9dd5c8d6e59e27af98e99d2844d6ead8eec3162/test/functional/test_framework/messages.py#L759-L764

    i.e. any extra rehash calls before are not necessary and can be dropped.

    The instances were identified by searching for all block solving calls via git grep "solve(" in ./test/functional/. From 95 instances of CBlock.solve() calls, 20 contained an unnecessary rehashing instruction before that are removed in this PR.

  2. test: remove unnecessary block rehashing prior to solving
    Solving a block involves continously rehashing it, i.e. any extra
    calls to rehash it before are not necessary and can be dropped.
    a9872e1478
  3. DrahtBot added the label Tests on Nov 12, 2021
  4. brunoerg approved
  5. brunoerg commented at 9:57 PM on November 12, 2021: member

    tACK a9872e1478af10ca335cca32abd248e87e103c02

    Ran the modified tests successfully.

  6. DrahtBot commented at 1:27 AM on November 13, 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:

    • #23127 (tests: Use test framework utils where possible by vincenzopalazzo)

    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.

  7. rajarshimaitra commented at 12:09 PM on November 14, 2021: contributor
  8. fanquake merged this on Nov 15, 2021
  9. fanquake closed this on Nov 15, 2021

  10. theStack deleted the branch on Nov 15, 2021
  11. sidhujag referenced this in commit c075b998a1 on Nov 15, 2021
  12. DrahtBot locked this on Nov 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-14 21:13 UTC

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