Skip to content

Commit 343c74b

Browse files
committed
fix: intermittent error in feature_index_prune due to DKG influence
1 parent de821b9 commit 343c74b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

test/functional/feature_index_prune.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111
)
1212
from test_framework.governance import EXPECTED_STDERR_NO_GOV_PRUNE
1313

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"]
1516

1617
class FeatureIndexPruneTest(BitcoinTestFramework):
1718
def set_test_params(self):
1819
self.num_nodes = 4
1920
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,
2425
]
2526

2627
def sync_index(self, height):
@@ -51,7 +52,7 @@ def mine_batches(self, blocks):
5152

5253
def restart_without_indices(self):
5354
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)
5556
self.reconnect_nodes()
5657

5758
def run_test(self):
@@ -110,7 +111,7 @@ def run_test(self):
110111
self.log.info("prune exactly up to the indices best blocks while the indices are disabled")
111112
for i in range(3):
112113
pruneheight_2 = self.nodes[i].pruneblockchain(1000)
113-
assert_equal(pruneheight_2, 932)
114+
assert_equal(pruneheight_2, 732)
114115
# Restart the nodes again with the indices activated
115116
self.restart_node(i, extra_args=self.extra_args[i], expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE)
116117

@@ -145,7 +146,7 @@ def run_test(self):
145146
for node in self.nodes[:2]:
146147
with node.assert_debug_log(['limited pruning to height 2489']):
147148
pruneheight_new = node.pruneblockchain(2500)
148-
assert_equal(pruneheight_new, 2197)
149+
assert_equal(pruneheight_new, 2125)
149150

150151
self.log.info("ensure that prune locks don't prevent indices from failing in a reorg scenario")
151152
with self.nodes[0].assert_debug_log(['basic block filter index prune lock moved back to 2480']):

0 commit comments

Comments
 (0)