diff options
author | Martin Zumsande <mzumsande@gmail.com> | 2022-04-06 15:28:46 +0200 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2022-04-24 22:28:25 +0200 |
commit | dac44fc06ff9938d070aa5221d106a7f31da9d81 (patch) | |
tree | e2d3631eb373791eda3b374da2fee406feb00873 /test/functional/feature_coinstatsindex.py | |
parent | 62e14285f95d4ecb9528813acca975640dd7c598 (diff) |
init: disallow reindex-chainstate with optional indexes
It currently leads to corruption (coinstatsindex) or
data duplication (blockfilterindex), so disable it.
Diffstat (limited to 'test/functional/feature_coinstatsindex.py')
-rwxr-xr-x | test/functional/feature_coinstatsindex.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/feature_coinstatsindex.py b/test/functional/feature_coinstatsindex.py index f865661894..251aa2114b 100755 --- a/test/functional/feature_coinstatsindex.py +++ b/test/functional/feature_coinstatsindex.py @@ -223,6 +223,20 @@ class CoinStatsIndexTest(BitcoinTestFramework): res10 = index_node.gettxoutsetinfo('muhash') assert(res8['txouts'] < res10['txouts']) + self.log.info("Test that the index works with -reindex") + + self.restart_node(1, extra_args=["-coinstatsindex", "-reindex"]) + res11 = index_node.gettxoutsetinfo('muhash') + assert_equal(res11, res10) + + self.log.info("Test that -reindex-chainstate is disallowed with coinstatsindex") + + self.nodes[1].assert_start_raises_init_error( + expected_msg='Error: -reindex-chainstate option is not compatible with -coinstatsindex. ' + 'Please temporarily disable coinstatsindex while using -reindex-chainstate, or replace -reindex-chainstate with -reindex to fully rebuild all indexes.', + extra_args=['-coinstatsindex', '-reindex-chainstate'], + ) + def _test_use_index_option(self): self.log.info("Test use_index option for nodes running the index") |