From 40c0e060473bf228cb79ade626b8030ec01f8e1c Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Tue, 13 Aug 2024 15:57:40 +0700 Subject: [PATCH] fix: use coinstatsindex instead blockfilterindex in feature_prunning That follow-up changes for backports bitcoin#15946 and bitcoin#19521 It fixes failure: TestFramework (INFO): Test invalid pruning command line options TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "dashtest/functional/test_framework/test_node.py", line 511, in assert_start_raises_init_error ret = self.process.wait(timeout=self.rpc_timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 1264, in wait return self._wait(timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 2038, in _wait raise TimeoutExpired(self.args, timeout) subprocess.TimeoutExpired: Command '['dashsrc/dashd', '-datadir=/tmp/dash_func_test_m8w6q7a2/node0', '-logtimemicros', '-debug', '-debugexclude=libevent', '-debugexclude=leveldb', '-mocktime=1417713337', '-uacomment=testnode0', '-logthreadnames', '-logsourcelocations', '-createwalletbackups=0', '-prune=550', '-blockfilterindex', '-mocktime=1417713337']' timed out after 120 seconds During handling of the above exception, another exception occurred: Traceback (most recent call last): File "dashtest/functional/test_framework/test_framework.py", line 159, in main self.run_test() File "dashtest/functional/feature_pruning.py", line 495, in run_test self.test_invalid_command_line_options() File "dashtest/functional/feature_pruning.py", line 149, in test_invalid_command_line_options self.nodes[0].assert_start_raises_init_error( File "dashtest/functional/test_framework/test_node.py", line 541, in assert_start_raises_init_error self._raise_assertion_error(assert_msg) File "dashtest/functional/test_framework/test_node.py", line 180, in _raise_assertion_error raise AssertionError(self._node_msg(msg)) AssertionError: [node 0] dashd should have exited within 120s with expected error Error: Prune mode is incompatible with -blockfilterindex. TestFramework (INFO): Stopping nodes --- test/functional/feature_pruning.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index f57023152a..5c34f7de16 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -142,13 +142,9 @@ class PruneTest(BitcoinTestFramework): expected_msg='Error: Prune mode is incompatible with -txindex.', extra_args=['-prune=550', '-txindex'], ) - # self.nodes[0].assert_start_raises_init_error( - # expected_msg='Error: Prune mode is incompatible with -coinstatsindex.', - # extra_args=['-prune=550', '-coinstatsindex'], - # ) self.nodes[0].assert_start_raises_init_error( - expected_msg='Error: Prune mode is incompatible with -blockfilterindex.', - extra_args=['-prune=550', '-blockfilterindex'], + expected_msg='Error: Prune mode is incompatible with -coinstatsindex.', + extra_args=['-prune=550', '-coinstatsindex'], ) self.nodes[0].assert_start_raises_init_error( expected_msg='Error: Prune mode is incompatible with -disablegovernance=false.',