test: Properly set BIP34 height in CreateNewBlock_validity unit test #22277

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2106-test34 changing 1 files +23 −36
  1. MarcoFalke commented at 8:46 AM on June 18, 2021: member

    The coinbase scriptSig in this unit test has several issues:

    While BIP34 isn't currently enforced in this unit test, this should be fixed to avoid confusion and to promote self-consistency.

    The change obviously requires new proof of work (BLOCKINFO).

    Also change the block version from 1 to VERSIONBITS_TOP_BITS, because this test shouldn't care about the block version and bumping it is required for other changes.

  2. test: Properly set BIP34 height in CreateNewBlock_validity unit test faa670d386
  3. DrahtBot added the label Tests on Jun 18, 2021
  4. DrahtBot commented at 11:03 AM on June 18, 2021: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  5. DrahtBot cross-referenced this on Jun 18, 2021 from issue test: Set BIP34Height = 2 for regtest by MarcoFalke
  6. theStack approved
  7. theStack commented at 7:28 PM on June 27, 2021: contributor

    Code review ACK faa670d3862783017f5cd1491f37648e1875f19f

    Checked that the block's coinbase scriptSig assignment matches now the BIP34 specification, verified upated proof of work (BLOCKINFO) by running the test. (By the way, being curious, how did you re-create it? I guess putting some grinding code directly into the loop? Could be interesting if ever other contributors want to change the test in a way that needs new PoW)

  8. MarcoFalke commented at 1:54 PM on July 9, 2021: member

    By the way, being curious, how did you re-create it? I guess putting some grinding code directly into the loop?

    Jup, IIRC I just ground in the loop and used std::cout or something similar to create the new table.

  9. MarcoFalke merged this on Aug 5, 2021
  10. MarcoFalke closed this on Aug 5, 2021

  11. MarcoFalke deleted the branch on Aug 5, 2021
  12. sidhujag referenced this in commit 01bfa127a5 on Aug 5, 2021
  13. amitiuttarwar cross-referenced this on Aug 5, 2021 from issue [addrman] De-duplicate Add() function by amitiuttarwar
  14. bitcoin locked this on Aug 16, 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-05-20 06:54 UTC