diff options
author | brunoerg <brunoely.gc@gmail.com> | 2022-08-26 15:23:21 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2022-09-05 10:21:41 -0300 |
commit | cca4f82b828669ae23f6ac64fb83e068b81ae189 (patch) | |
tree | 13b2b2ce8e46ed4a07f9944656fd92f148e861df | |
parent | bbbc26dcfc873977a8e3a802f656f6c43301cc7c (diff) |
test: add coverage for rpc error when trying to rescan beyond pruned data
-rwxr-xr-x | test/functional/feature_pruning.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index 7dbeccbc09..9f37335850 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -143,6 +143,10 @@ class PruneTest(BitcoinTestFramework): extra_args=['-prune=550', '-reindex-chainstate'], ) + def test_rescan_blockchain(self): + self.restart_node(0, ["-prune=550"]) + assert_raises_rpc_error(-1, "Can't rescan beyond pruned data. Use RPC call getblockchaininfo to determine your pruned height.", self.nodes[0].rescanblockchain) + def test_height_min(self): assert os.path.isfile(os.path.join(self.prunedir, "blk00000.dat")), "blk00000.dat is missing, pruning too early" self.log.info("Success") @@ -477,6 +481,9 @@ class PruneTest(BitcoinTestFramework): self.log.info("Test wallet re-scan") self.wallet_test() + self.log.info("Test it's not possible to rescan beyond pruned data") + self.test_rescan_blockchain() + self.log.info("Test invalid pruning command line options") self.test_invalid_command_line_options() |