mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user