Skip to content

Commit 0aa641f

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#26206: test: check importing wallets when blocks are pruned throw an error
4aff7a4 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 4aff7a4 Tree-SHA512: fbbf6056cb3759f726b8a5ff25fca51bf47e973e5d655ec164e2bec88e2dbd3b243677869d2cf33af268ea635ca0f2e9f737c4734077fc5a936ac3a24ad4b88b
2 parents 5974c49 + 4aff7a4 commit 0aa641f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/functional/feature_pruning.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ def wallet_test(self):
358358
self.restart_node(2, extra_args=["-prune=550"])
359359
self.log.info("Success")
360360

361+
assert_raises_rpc_error(-4, "Importing wallets is disabled when blocks are pruned", self.nodes[2].importwallet, "abc")
362+
361363
# check that wallet loads successfully when restarting a pruned node after IBD.
362364
# this was reported to fail in #7494.
363365
self.log.info("Syncing node 5 to test wallet")

0 commit comments

Comments
 (0)