Change MigrateLegacyToDescriptor to reopen wallet as BERKELEY_RO

When we reopen the wallet to do the migration, instead of opening using
BDB, open it using the BerkeleyRO implementation.
This commit is contained in:
Ava Chow
2024-01-05 18:36:19 -05:00
parent a786fd2041
commit 517e204bac
2 changed files with 34 additions and 5 deletions

View File

@@ -205,9 +205,13 @@ class WalletMigrationTest(BitcoinTestFramework):
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")
self.log.info("Test \"nothing to migrate\" when the user tries to migrate a loaded wallet with no legacy data")
assert_raises_rpc_error(-4, "Error: This wallet is already a descriptor wallet", basic2.migratewallet)
self.log.info("Test \"nothing to migrate\" when the user tries to migrate an unloaded wallet with no legacy data")
basic2.unloadwallet()
assert_raises_rpc_error(-4, "Error: This wallet is already a descriptor wallet", self.nodes[0].migratewallet, "basic2")
def test_multisig(self):
default = self.nodes[0].get_wallet_rpc(self.default_wallet_name)