aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2023-02-01 17:05:25 -0500
committerAndrew Chow <github@achow101.com>2023-02-01 17:14:13 -0500
commitfdd363ebd917e5916742587608d59023ced513e1 (patch)
tree0afa8d953f778fbeb3ed373c1b82ac97d39104ae /test
parent2d5acc901db336868dee158022a115b120b5b675 (diff)
parent6d31900e52efa2c7c7a220d8c8ad6353c412a2aa (diff)
Merge bitcoin/bitcoin#26910: wallet: migrate wallet, exit early if no legacy data exist
6d31900e52efa2c7c7a220d8c8ad6353c412a2aa wallet: migrate wallet, exit early if no legacy data exist (furszy) Pull request description: The process first creates a backup file then return an error, without removing the recently created file, when notices that the db is already running sqlite. ACKs for top commit: john-moffett: ACK 6d31900e52efa2c7c7a220d8c8ad6353c412a2aa achow101: ACK 6d31900e52efa2c7c7a220d8c8ad6353c412a2aa ishaanam: crACK 6d31900e52efa2c7c7a220d8c8ad6353c412a2aa Tree-SHA512: 9fb52e80de96e129487ab91bef13647bc4570a782003b1e37940e2a00ca26283fd24ad39bdb63a984ae0a56140b518fd0d74aa2fc59ab04405b2c179b7d3c54a
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/wallet_migration.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/wallet_migration.py b/test/functional/wallet_migration.py
index 688ac98617..72c5fe7b84 100755
--- a/test/functional/wallet_migration.py
+++ b/test/functional/wallet_migration.py
@@ -163,6 +163,10 @@ class WalletMigrationTest(BitcoinTestFramework):
assert_equal(basic2.getbalance(), basic2_balance)
self.assert_list_txs_equal(basic2.listtransactions(), basic2_txs)
+ # Now test migration on a descriptor wallet
+ self.log.info("Test \"nothing to migrate\" when the user tries to migrate a wallet with no legacy data")
+ assert_raises_rpc_error(-4, "Error: This wallet is already a descriptor wallet", basic2.migratewallet)
+
def test_multisig(self):
default = self.nodes[0].get_wallet_rpc(self.default_wallet_name)