diff options
Diffstat (limited to 'test/functional/feature_index_prune.py')
-rwxr-xr-x | test/functional/feature_index_prune.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/functional/feature_index_prune.py b/test/functional/feature_index_prune.py index 2bf57db923..bc85e43a57 100755 --- a/test/functional/feature_index_prune.py +++ b/test/functional/feature_index_prune.py @@ -8,7 +8,6 @@ from test_framework.util import ( assert_equal, assert_greater_than, assert_raises_rpc_error, - p2p_port, ) @@ -74,7 +73,7 @@ class FeatureIndexPruneTest(BitcoinTestFramework): pruneheight_new = node.pruneblockchain(400) # the prune heights used here and below are magic numbers that are determined by the # thresholds at which block files wrap, so they depend on disk serialization and default block file size. - assert_equal(pruneheight_new, 249) + assert_equal(pruneheight_new, 248) self.log.info("check if we can access the tips blockfilter and coinstats when we have pruned some blocks") tip = self.nodes[0].getbestblockhash() @@ -109,7 +108,7 @@ class FeatureIndexPruneTest(BitcoinTestFramework): self.log.info("prune exactly up to the indices best blocks while the indices are disabled") for i in range(3): pruneheight_2 = self.nodes[i].pruneblockchain(1000) - assert_equal(pruneheight_2, 751) + assert_equal(pruneheight_2, 750) # Restart the nodes again with the indices activated self.restart_node(i, extra_args=self.extra_args[i]) @@ -132,18 +131,18 @@ class FeatureIndexPruneTest(BitcoinTestFramework): self.nodes[i].assert_start_raises_init_error(extra_args=self.extra_args[i], expected_msg=msg) self.log.info("make sure the nodes start again with the indices and an additional -reindex arg") - ip_port = "127.0.0.1:" + str(p2p_port(3)) for i in range(3): - # The nodes need to be reconnected to the non-pruning node upon restart, otherwise they will be stuck - restart_args = self.extra_args[i]+["-reindex", f"-connect={ip_port}"] + restart_args = self.extra_args[i]+["-reindex"] self.restart_node(i, extra_args=restart_args) + # The nodes need to be reconnected to the non-pruning node upon restart, otherwise they will be stuck + self.connect_nodes(i, 3) self.sync_blocks(timeout=300) for node in self.nodes[:2]: with node.assert_debug_log(['limited pruning to height 2489']): pruneheight_new = node.pruneblockchain(2500) - assert_equal(pruneheight_new, 2006) + assert_equal(pruneheight_new, 2005) self.log.info("ensure that prune locks don't prevent indices from failing in a reorg scenario") with self.nodes[0].assert_debug_log(['basic block filter index prune lock moved back to 2480']): |