|
11 | 11 | ) |
12 | 12 | from test_framework.governance import EXPECTED_STDERR_NO_GOV_PRUNE |
13 | 13 |
|
14 | | -DEPLOYMENT_ARG = "-testactivationheight=v20@3000" |
| 14 | +# TODO: remove testactivationheight=v20@3000 when it will be activated from block 1 |
| 15 | +DEPLOYMENT_ARGS = ["-testactivationheight=v20@3000", "-dip3params=3000:3000"] |
15 | 16 |
|
16 | 17 | class FeatureIndexPruneTest(BitcoinTestFramework): |
17 | 18 | def set_test_params(self): |
18 | 19 | self.num_nodes = 4 |
19 | 20 | self.extra_args = [ |
20 | | - ["-fastprune", "-prune=1", "-blockfilterindex=1", DEPLOYMENT_ARG], |
21 | | - ["-fastprune", "-prune=1", "-coinstatsindex=1", DEPLOYMENT_ARG], |
22 | | - ["-fastprune", "-prune=1", "-blockfilterindex=1", "-coinstatsindex=1", DEPLOYMENT_ARG], |
23 | | - [DEPLOYMENT_ARG] |
| 21 | + ["-fastprune", "-prune=1", "-blockfilterindex=1"] + DEPLOYMENT_ARGS, |
| 22 | + ["-fastprune", "-prune=1", "-coinstatsindex=1"] + DEPLOYMENT_ARGS, |
| 23 | + ["-fastprune", "-prune=1", "-blockfilterindex=1", "-coinstatsindex=1"] + DEPLOYMENT_ARGS, |
| 24 | + [] + DEPLOYMENT_ARGS, |
24 | 25 | ] |
25 | 26 |
|
26 | 27 | def sync_index(self, height): |
@@ -51,7 +52,7 @@ def mine_batches(self, blocks): |
51 | 52 |
|
52 | 53 | def restart_without_indices(self): |
53 | 54 | for i in range(3): |
54 | | - self.restart_node(i, extra_args=["-fastprune", "-prune=1", DEPLOYMENT_ARG], expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE) |
| 55 | + self.restart_node(i, extra_args=["-fastprune", "-prune=1"] + DEPLOYMENT_ARGS, expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE) |
55 | 56 | self.reconnect_nodes() |
56 | 57 |
|
57 | 58 | def run_test(self): |
@@ -110,7 +111,7 @@ def run_test(self): |
110 | 111 | self.log.info("prune exactly up to the indices best blocks while the indices are disabled") |
111 | 112 | for i in range(3): |
112 | 113 | pruneheight_2 = self.nodes[i].pruneblockchain(1000) |
113 | | - assert_equal(pruneheight_2, 932) |
| 114 | + assert_equal(pruneheight_2, 732) |
114 | 115 | # Restart the nodes again with the indices activated |
115 | 116 | self.restart_node(i, extra_args=self.extra_args[i], expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE) |
116 | 117 |
|
@@ -145,7 +146,7 @@ def run_test(self): |
145 | 146 | for node in self.nodes[:2]: |
146 | 147 | with node.assert_debug_log(['limited pruning to height 2489']): |
147 | 148 | pruneheight_new = node.pruneblockchain(2500) |
148 | | - assert_equal(pruneheight_new, 2197) |
| 149 | + assert_equal(pruneheight_new, 2125) |
149 | 150 |
|
150 | 151 | self.log.info("ensure that prune locks don't prevent indices from failing in a reorg scenario") |
151 | 152 | with self.nodes[0].assert_debug_log(['basic block filter index prune lock moved back to 2480']): |
|
0 commit comments