aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_index_prune.py
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2023-05-17 16:06:55 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-07-10 10:50:50 -0300
commitfcbdaeef4d5a63e3e5b479c6fcad730eb86fb923 (patch)
treee266b0cab828adc38232b388fd6bd3ff0538bdd7 /test/functional/feature_index_prune.py
parent2ec89f1970935d27631bcd17b7923a79cdb1edbb (diff)
downloadbitcoin-fcbdaeef4d5a63e3e5b479c6fcad730eb86fb923.tar.xz
init: don't start indexes sync thread prematurely
By moving the 'StartIndexes()' call into the 'initload' thread, we can remove the threads active wait. Optimizing the available resources. The only difference with the current state is that now the indexes threads will only be started when they can process work and not before it.
Diffstat (limited to 'test/functional/feature_index_prune.py')
-rwxr-xr-xtest/functional/feature_index_prune.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/feature_index_prune.py b/test/functional/feature_index_prune.py
index 77a056346a..d6e802b399 100755
--- a/test/functional/feature_index_prune.py
+++ b/test/functional/feature_index_prune.py
@@ -3,6 +3,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test indices in conjunction with prune."""
+import os
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
@@ -127,8 +128,9 @@ class FeatureIndexPruneTest(BitcoinTestFramework):
self.log.info("make sure we get an init error when starting the nodes again with the indices")
filter_msg = "Error: basic block filter index best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)"
stats_msg = "Error: coinstatsindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)"
+ end_msg = f"{os.linesep}Error: Failed to start indexes, shutting down.."
for i, msg in enumerate([filter_msg, stats_msg, filter_msg]):
- self.nodes[i].assert_start_raises_init_error(extra_args=self.extra_args[i], expected_msg=msg)
+ self.nodes[i].assert_start_raises_init_error(extra_args=self.extra_args[i], expected_msg=msg+end_msg)
self.log.info("make sure the nodes start again with the indices and an additional -reindex arg")
for i in range(3):