aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-10-19 09:11:44 +0200
committerMacroFake <falke.marco@gmail.com>2022-10-19 09:11:47 +0200
commit0aa641f5f4ab8c877cf12968c6585d2ad80c6838 (patch)
tree2a5c05ef1e86fd4dac22e253dfbf20e141fcec9c /test
parent5974c49f90eaece7b8ead7b98975a73e69ce4719 (diff)
parent4aff7a48a4e0f1075306f181a276b8a74c857022 (diff)
downloadbitcoin-0aa641f5f4ab8c877cf12968c6585d2ad80c6838.tar.xz
Merge bitcoin/bitcoin#26206: test: check importing wallets when blocks are pruned throw an error
4aff7a48a4e0f1075306f181a276b8a74c857022 test: check importing wallets when blocks are pruned throw an error (brunoerg) Pull request description: This PR adds test coverage for the following error: https://github.com/bitcoin/bitcoin/blob/437b608df289c97fd88f1dd79bdc8359e1b1c5b1/src/wallet/rpc/backup.cpp#L513-L518 ACKs for top commit: andrewtoth: ACK 4aff7a48a4e0f1075306f181a276b8a74c857022 Tree-SHA512: fbbf6056cb3759f726b8a5ff25fca51bf47e973e5d655ec164e2bec88e2dbd3b243677869d2cf33af268ea635ca0f2e9f737c4734077fc5a936ac3a24ad4b88b
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_pruning.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py
index 7dbeccbc09..4126ffcd51 100755
--- a/test/functional/feature_pruning.py
+++ b/test/functional/feature_pruning.py
@@ -358,6 +358,8 @@ class PruneTest(BitcoinTestFramework):
self.restart_node(2, extra_args=["-prune=550"])
self.log.info("Success")
+ assert_raises_rpc_error(-4, "Importing wallets is disabled when blocks are pruned", self.nodes[2].importwallet, "abc")
+
# check that wallet loads successfully when restarting a pruned node after IBD.
# this was reported to fail in #7494.
self.log.info("Syncing node 5 to test wallet")