0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

Merge bitcoin/bitcoin#26660: test: Use last release in compatibility tests

fabb24cbef test: Use last release in compatibility tests (MarcoFalke)

Pull request description:

  In compatibility tests it makes sense to always use the last release without the new feature, as it is likely more in use than any even older previous release.

ACKs for top commit:
  Sjors:
    utACK fabb24c

Tree-SHA512: beb854f4d28ba313282e1e0303abb0e09377828b138bde5a3e209337210b6b4c24855ab90a68f8789387001e4ca33b15cc37dbc9b7809929f4e7d1b69833a527
This commit is contained in:
MarcoFalke 2022-12-09 09:25:41 +01:00
commit 16624e6ff3
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
2 changed files with 6 additions and 5 deletions

View file

@ -14,7 +14,7 @@ from test_framework.test_framework import BitcoinTestFramework
from test_framework.wallet import MiniWallet
class MempoolCompatibilityTest(BitcoinTestFramework):
class TxindexCompatibilityTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 3
self.extra_args = [
@ -33,7 +33,7 @@ class MempoolCompatibilityTest(BitcoinTestFramework):
versions=[
160300, # Last release with legacy txindex
None, # For MiniWallet, without migration code
200100, # Any release with migration code (0.17.x - 22.x)
220000, # Last release with migration code (0.17.x - 22.x)
],
)
self.start_nodes()
@ -89,4 +89,4 @@ class MempoolCompatibilityTest(BitcoinTestFramework):
if __name__ == "__main__":
MempoolCompatibilityTest().main()
TxindexCompatibilityTest().main()

View file

@ -7,7 +7,7 @@
NOTE: The test is designed to prevent cases when compatibility is broken accidentally.
In case we need to break mempool compatibility we can continue to use the test by just bumping the version number.
The previous release v0.19.1 is required by this test, see test/README.md.
Previous releases are required by this test, see test/README.md.
"""
import os
@ -29,7 +29,7 @@ class MempoolCompatibilityTest(BitcoinTestFramework):
def setup_network(self):
self.add_nodes(self.num_nodes, versions=[
190100, # oldest version with getmempoolinfo.loaded (used to avoid intermittent issues)
200100, # Last release with previous mempool format
None,
])
self.start_nodes()
@ -38,6 +38,7 @@ class MempoolCompatibilityTest(BitcoinTestFramework):
self.log.info("Test that mempool.dat is compatible between versions")
old_node, new_node = self.nodes
assert "unbroadcastcount" not in old_node.getmempoolinfo()
new_wallet = MiniWallet(new_node, mode=MiniWalletMode.RAW_P2PK)
self.generate(new_wallet, 1, sync_fun=self.no_op)
self.generate(new_node, COINBASE_MATURITY, sync_fun=self.no_op)