init: disallow reindex-chainstate when pruning

This fixes a bug where the node would be stuck in an
endless loop when combining these parameters.
This commit is contained in:
Martin Zumsande
2022-03-21 13:13:49 +01:00
parent 91d12344b1
commit b2813980b8
2 changed files with 7 additions and 1 deletions

View File

@@ -141,6 +141,10 @@ class PruneTest(BitcoinTestFramework):
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 -reindex-chainstate. Use full -reindex instead.',
extra_args=['-prune=550', '-reindex-chainstate'],
)
def test_height_min(self):
assert os.path.isfile(os.path.join(self.prunedir, "blk00000.dat")), "blk00000.dat is missing, pruning too early"