@@ -102,6 +102,7 @@ def migrate_and_get_rpc(self, wallet_name, **kwargs):
102102 # Reload to force write that record
103103 self .old_node .unloadwallet (wallet_name )
104104 self .old_node .loadwallet (wallet_name )
105+ assert_equal (self .old_node .get_wallet_rpc (wallet_name ).getwalletinfo ()["descriptors" ], False )
105106 # Now unload so we can copy it to the master node for the migration test
106107 self .old_node .unloadwallet (wallet_name )
107108 if wallet_name == "" :
@@ -111,7 +112,10 @@ def migrate_and_get_rpc(self, wallet_name, **kwargs):
111112 # Migrate, checking that rescan does not occur
112113 with self .master_node .assert_debug_log (expected_msgs = [], unexpected_msgs = ["Rescanning" ]):
113114 migrate_info = self .master_node .migratewallet (wallet_name = wallet_name , ** kwargs )
114- return migrate_info , self .master_node .get_wallet_rpc (wallet_name )
115+ wallet = self .master_node .get_wallet_rpc (wallet_name )
116+ assert_equal (wallet .getwalletinfo ()["descriptors" ], True )
117+ self .assert_is_sqlite (wallet_name )
118+ return migrate_info , wallet
115119
116120 def test_basic (self ):
117121 default = self .master_node .get_wallet_rpc (self .default_wallet_name )
@@ -132,10 +136,6 @@ def test_basic(self):
132136 # Note: migration could take a while.
133137 _ , basic0 = self .migrate_and_get_rpc ("basic0" )
134138
135- # Verify created descriptors
136- assert_equal (basic0 .getwalletinfo ()["descriptors" ], True )
137- self .assert_is_sqlite ("basic0" )
138-
139139 # The wallet should create the following descriptors:
140140 # * BIP32 descriptors in the form of "0h/0h/*" and "0h/1h/*" (2 descriptors)
141141 # * BIP44 descriptors in the form of "44h/1h/0h/0/*" and "44h/1h/0h/1/*" (2 descriptors)
@@ -172,8 +172,6 @@ def test_basic(self):
172172 addr_gps = basic1 .listaddressgroupings ()
173173
174174 basic1_migrate , basic1 = self .migrate_and_get_rpc ("basic1" )
175- assert_equal (basic1 .getwalletinfo ()["descriptors" ], True )
176- self .assert_is_sqlite ("basic1" )
177175 assert_equal (basic1 .getbalance (), bal )
178176 self .assert_list_txs_equal (basic1 .listtransactions (), txs )
179177
@@ -191,8 +189,6 @@ def test_basic(self):
191189 default = self .master_node .get_wallet_rpc (self .default_wallet_name )
192190 self .master_node .loadwallet ("basic1" )
193191 basic1 = self .master_node .get_wallet_rpc ("basic1" )
194- assert_equal (basic1 .getwalletinfo ()["descriptors" ], True )
195- self .assert_is_sqlite ("basic1" )
196192 assert_equal (basic1 .getbalance (), bal )
197193 self .assert_list_txs_equal (basic1 .listtransactions (), txs )
198194
@@ -214,8 +210,6 @@ def test_basic(self):
214210
215211 # Now migrate and test that we still have the same balance/transactions
216212 _ , basic2 = self .migrate_and_get_rpc ("basic2" )
217- assert_equal (basic2 .getwalletinfo ()["descriptors" ], True )
218- self .assert_is_sqlite ("basic2" )
219213 assert_equal (basic2 .getbalance (), basic2_balance )
220214 self .assert_list_txs_equal (basic2 .listtransactions (), basic2_txs )
221215
@@ -240,8 +234,6 @@ def test_multisig(self):
240234 ms_info = multisig0 .addmultisigaddress (2 , [addr1 , addr2 , addr3 ])
241235
242236 _ , multisig0 = self .migrate_and_get_rpc ("multisig0" )
243- assert_equal (multisig0 .getwalletinfo ()["descriptors" ], True )
244- self .assert_is_sqlite ("multisig0" )
245237 ms_addr_info = multisig0 .getaddressinfo (ms_info ["address" ])
246238 assert_equal (ms_addr_info ["ismine" ], True )
247239 assert_equal (ms_addr_info ["desc" ], ms_info ["descriptor" ])
@@ -275,8 +267,6 @@ def test_multisig(self):
275267 # A new wallet multisig1_watchonly is created which has the multisig address
276268 # Transaction to multisig is in multisig1_watchonly and not multisig1
277269 _ , multisig1 = self .migrate_and_get_rpc ("multisig1" )
278- assert_equal (multisig1 .getwalletinfo ()["descriptors" ], True )
279- self .assert_is_sqlite ("multisig1" )
280270 assert_equal (multisig1 .getaddressinfo (addr1 )["ismine" ], False )
281271 assert_equal (multisig1 .getaddressinfo (addr1 )["iswatchonly" ], False )
282272 assert_equal (multisig1 .getaddressinfo (addr1 )["solvable" ], False )
@@ -361,8 +351,6 @@ def test_other_watchonly(self):
361351
362352 # Migrate
363353 _ , imports0 = self .migrate_and_get_rpc ("imports0" )
364- assert_equal (imports0 .getwalletinfo ()["descriptors" ], True )
365- self .assert_is_sqlite ("imports0" )
366354 assert_raises_rpc_error (- 5 , "Invalid or non-wallet transaction id" , imports0 .gettransaction , received_watchonly_txid )
367355 assert_raises_rpc_error (- 5 , "Invalid or non-wallet transaction id" , imports0 .gettransaction , received_sent_watchonly_utxo ['txid' ])
368356 assert_raises_rpc_error (- 5 , "Invalid or non-wallet transaction id" , imports0 .gettransaction , sent_watchonly_txid )
@@ -918,7 +906,6 @@ def test_blank(self):
918906 assert_equal (wallet .getwalletinfo ()["blank" ], True )
919907 _ , wallet = self .migrate_and_get_rpc ("blank" )
920908 assert_equal (wallet .getwalletinfo ()["blank" ], True )
921- assert_equal (wallet .getwalletinfo ()["descriptors" ], True )
922909
923910 def test_avoidreuse (self ):
924911 self .log .info ("Test that avoidreuse persists after migration" )
0 commit comments