-blockversion is currently untested, as in: The setting could be made a no-op without any tests failing. Fix that by adding an explicit test for it. Also, related minor cleanups.
test: Add test for -blockversion #20167
pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:2010-testBlockversion changing 4 files +27 −16-
MarcoFalke commented at 11:31 AM on October 16, 2020: member
-
test: Remove unused -blockversion from tests fa2b778d0c
-
fa7fb0e442
test: Default blockversion to 4 in feature_block
There is one tests that checks version=1 blocks are rejected. For all other tests the version doesn't matter as long as it is large enough.
- fanquake added the label Tests on Oct 16, 2020
-
DrahtBot commented at 2:34 PM on October 16, 2020: 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:
- #19461 (multiprocess: Add bitcoin-gui -ipcconnect option by ryanofsky)
- #19460 (multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky)
- #10102 ([experimental] Multiprocess bitcoin by ryanofsky)
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.
-
in test/functional/mining_basic.py:16 in fa39c56235 outdated
12 | @@ -13,6 +13,7 @@ 13 | 14 | from test_framework.blocktools import ( 15 | create_coinbase, 16 | + NORMAL_GBT_REQUEST_PARAMS,
naumenkogs commented at 7:19 AM on October 19, 2020:Could you point me to where this is defined?
MarcoFalke commented at 7:21 AM on October 19, 2020:git grep NORMAL_GBT_REQUEST_PARAMS;)
naumenkogs commented at 7:41 AM on October 19, 2020:Oh, I see, I assumed it was introduced in this PR... Resolve pls
in test/functional/mining_basic.py:65 in fa39c56235 outdated
60 | + self.restart_node(0, extra_args=['-mocktime={}'.format(t), '-blockversion=1337']) 61 | + self.connect_nodes(0, 1) 62 | + assert_equal(1337, self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)['version']) 63 | + self.restart_node(0, extra_args=['-mocktime={}'.format(t)]) 64 | + self.connect_nodes(0, 1) 65 | + assert_equal(0x30000000, self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)['version'])
guggero commented at 9:20 AM on October 22, 2020:nit: To me it wasn't obvious at first why the version now is
0x30000000. Would it make sense to extract this "magic value" into a variable calledversionTaprootfor example?
MarcoFalke commented at 3:33 PM on October 26, 2020:This has nothing to do with taproot. Changed to
VERSIONBITS_TOP_BITS + (1 << VERSIONBITS_DEPLOYMENT_TESTDUMMY_BIT)guggero commented at 9:21 AM on October 22, 2020: contributorACK fa39c5623545e998ae23d47ef9da63d5ed4dd3cb.
Nice cleanup and great to have the block version covered in a functional test as well!
test: Add test for -blockversion fa9b48549cMarcoFalke force-pushed on Oct 26, 2020guggero commented at 4:05 PM on October 26, 2020: contributorACK fa9b48549ca39b862a10bcfd90e3eac2a0e8ad2e.
laanwj merged this on Oct 27, 2020laanwj closed this on Oct 27, 2020sidhujag referenced this in commit d4325b9bd4 on Oct 27, 2020MarcoFalke deleted the branch on Oct 27, 2020Fabcien referenced this in commit f0a959057a on Dec 15, 2021Fabcien referenced this in commit 76b78977ca on Dec 15, 2021Fabcien referenced this in commit 81fa8f13ff on Dec 15, 2021DrahtBot locked this on Feb 15, 2022ContributorsLabels
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-17 06:14 UTC
More mirrored repositories can be found on mirror.b10c.me