test: characterize startup with newly added prune and index

This commit is contained in:
Andrew Toth
2026-09-08 21:05:59 -04:00
parent b811aeabad
commit 0ae3b40c27

View File

@@ -20,6 +20,7 @@ from test_framework.script import (
OP_RETURN,
)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.test_node import ErrorMatch
from test_framework.util import (
assert_equal,
assert_greater_than,
@@ -470,6 +471,17 @@ class PruneTest(BitcoinTestFramework):
self.connect_nodes(0, 5)
self.sync_blocks([self.nodes[0], self.nodes[5]], wait=5, timeout=300)
self.log.info("Test prune with a new index")
self.stop_node(0)
node = self.nodes[0]
# TODO: Starting prune with a new index must sync the index before pruning.
node.assert_start_raises_init_error(
extra_args=["-prune=550", "-blockfilterindex=1"],
expected_msg="basic block filter index best block of the index goes beyond pruned data",
match=ErrorMatch.PARTIAL_REGEX,
)
self.start_node(0, extra_args=["-prune=550"])
if self.is_wallet_compiled():
self.log.info("Test wallet re-scan")
self.test_wallet_rescan()