wallet_resendwallettransaction.py: fix coinbase height #16292

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:resend_test_height changing 1 files +1 −1
  1. instagibbs commented at 5:29 PM on June 26, 2019: member

    Coinbase height is yet to be enforced on regtest, which allows these little errors in.

  2. wallet_resendwallettransaction.py: fix coinbase height eb3c8de168
  3. DrahtBot added the label Tests on Jun 26, 2019
  4. promag commented at 11:11 AM on June 27, 2019: member

    From BIP34:

    Height is the height of the mined block in the block chain, where the genesis block is height zero

    So I think current code is correct?

  5. instagibbs commented at 2:15 PM on June 27, 2019: member

    @promag you're making the next block, so no it's not. FWIW We have bip34 active on Elements functional tests which is how I ran into this.

  6. promag commented at 2:22 PM on June 27, 2019: member

    @instagibbs I've just thought of this case: if getblockchaininfo()['blocks'] == 0 (no blocks) then genesis block must have height == 0.

  7. MarcoFalke added the label Needs gitian build on Jun 27, 2019
  8. MarcoFalke removed the label Needs gitian build on Jun 27, 2019
  9. instagibbs commented at 2:28 PM on June 27, 2019: member

    (assuming it's the same result as getblockcount) with genesis block already known, the value is 0.

    it's literally just return chainActive.Height();

  10. promag commented at 2:36 PM on June 27, 2019: member

    Actually node.getblockchaininfo()['blocks'] or node.getblockcount() return the chain height (it doesn't count genesis block). Sorry for the noise.

    ACK eb3c8de16882bfdf64c5e096893832f0890d8a42.

  11. promag commented at 4:37 PM on July 2, 2019: member
  12. DrahtBot commented at 4:43 PM on July 2, 2019: 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:

    • #16325 (rpc: Clarify that block count means height excl genesis by MarcoFalke)

    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.

  13. instagibbs commented at 4:45 PM on July 2, 2019: member
  14. instagibbs closed this on Jul 2, 2019

  15. MarcoFalke commented at 5:19 PM on July 2, 2019: member

    Thanks, I am also working on activating BIP34 earlier in regtest :hourglass:

  16. instagibbs commented at 5:23 PM on July 2, 2019: member

    I'm ~certain someone wrote a PR to do that already, but I cannot find it.

  17. laanwj referenced this in commit 11de669d8b on Jul 3, 2019
  18. monstrobishi referenced this in commit afdbbb93ac on Sep 6, 2020
  19. Munkybooty referenced this in commit 01b553bf57 on Nov 4, 2021
  20. Munkybooty referenced this in commit 9363a84caa on Nov 4, 2021
  21. vijaydasmp referenced this in commit 848d55251c on Dec 7, 2021
  22. vijaydasmp referenced this in commit 5e75934e61 on Dec 11, 2021
  23. vijaydasmp referenced this in commit 1ec2d63c8f on Dec 11, 2021
  24. vijaydasmp referenced this in commit aca95b442f on Dec 13, 2021
  25. vijaydasmp referenced this in commit 33cd5f523e on Dec 14, 2021
  26. vijaydasmp referenced this in commit d55180d20c on Dec 15, 2021
  27. vijaydasmp referenced this in commit 867371b752 on Dec 15, 2021
  28. DrahtBot locked this on Dec 16, 2021

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-13 15:14 UTC

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