Coinbase height is yet to be enforced on regtest, which allows these little errors in.
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-
instagibbs commented at 5:29 PM on June 26, 2019: member
-
wallet_resendwallettransaction.py: fix coinbase height eb3c8de168
- DrahtBot added the label Tests on Jun 26, 2019
-
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?
-
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.
-
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 haveheight == 0. - MarcoFalke added the label Needs gitian build on Jun 27, 2019
- MarcoFalke removed the label Needs gitian build on Jun 27, 2019
-
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 is0.it's literally just
return chainActive.Height(); -
promag commented at 2:36 PM on June 27, 2019: member
Actually
node.getblockchaininfo()['blocks']ornode.getblockcount()return the chain height (it doesn't count genesis block). Sorry for the noise.ACK eb3c8de16882bfdf64c5e096893832f0890d8a42.
-
promag commented at 4:37 PM on July 2, 2019: member
@instagibbs prefer #16292?
-
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.
-
instagibbs commented at 4:45 PM on July 2, 2019: member
closing in favor of https://github.com/bitcoin/bitcoin/pull/16325
- instagibbs closed this on Jul 2, 2019
-
MarcoFalke commented at 5:19 PM on July 2, 2019: member
Thanks, I am also working on activating BIP34 earlier in regtest :hourglass:
-
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.
- laanwj referenced this in commit 11de669d8b on Jul 3, 2019
- monstrobishi referenced this in commit afdbbb93ac on Sep 6, 2020
- Munkybooty referenced this in commit 01b553bf57 on Nov 4, 2021
- Munkybooty referenced this in commit 9363a84caa on Nov 4, 2021
- vijaydasmp referenced this in commit 848d55251c on Dec 7, 2021
- vijaydasmp referenced this in commit 5e75934e61 on Dec 11, 2021
- vijaydasmp referenced this in commit 1ec2d63c8f on Dec 11, 2021
- vijaydasmp referenced this in commit aca95b442f on Dec 13, 2021
- vijaydasmp referenced this in commit 33cd5f523e on Dec 14, 2021
- vijaydasmp referenced this in commit d55180d20c on Dec 15, 2021
- vijaydasmp referenced this in commit 867371b752 on Dec 15, 2021
- DrahtBot locked this on Dec 16, 2021