Skip to content

Commit 16624e6

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26660: test: Use last release in compatibility tests
fabb24c 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
2 parents 6d11f19 + fabb24c commit 16624e6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

test/functional/feature_txindex_compatibility.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from test_framework.wallet import MiniWallet
1515

1616

17-
class MempoolCompatibilityTest(BitcoinTestFramework):
17+
class TxindexCompatibilityTest(BitcoinTestFramework):
1818
def set_test_params(self):
1919
self.num_nodes = 3
2020
self.extra_args = [
@@ -33,7 +33,7 @@ def setup_network(self):
3333
versions=[
3434
160300, # Last release with legacy txindex
3535
None, # For MiniWallet, without migration code
36-
200100, # Any release with migration code (0.17.x - 22.x)
36+
220000, # Last release with migration code (0.17.x - 22.x)
3737
],
3838
)
3939
self.start_nodes()
@@ -89,4 +89,4 @@ def run_test(self):
8989

9090

9191
if __name__ == "__main__":
92-
MempoolCompatibilityTest().main()
92+
TxindexCompatibilityTest().main()

test/functional/mempool_compatibility.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
NOTE: The test is designed to prevent cases when compatibility is broken accidentally.
88
In case we need to break mempool compatibility we can continue to use the test by just bumping the version number.
99
10-
The previous release v0.19.1 is required by this test, see test/README.md.
10+
Previous releases are required by this test, see test/README.md.
1111
"""
1212

1313
import os
@@ -29,7 +29,7 @@ def skip_test_if_missing_module(self):
2929

3030
def setup_network(self):
3131
self.add_nodes(self.num_nodes, versions=[
32-
190100, # oldest version with getmempoolinfo.loaded (used to avoid intermittent issues)
32+
200100, # Last release with previous mempool format
3333
None,
3434
])
3535
self.start_nodes()
@@ -38,6 +38,7 @@ def run_test(self):
3838
self.log.info("Test that mempool.dat is compatible between versions")
3939

4040
old_node, new_node = self.nodes
41+
assert "unbroadcastcount" not in old_node.getmempoolinfo()
4142
new_wallet = MiniWallet(new_node, mode=MiniWalletMode.RAW_P2PK)
4243
self.generate(new_wallet, 1, sync_fun=self.no_op)
4344
self.generate(new_node, COINBASE_MATURITY, sync_fun=self.no_op)

0 commit comments

Comments
 (0)