@@ -102,6 +102,7 @@ def migrate_and_get_rpc(self, wallet_name, **kwargs):
102
102
# Reload to force write that record
103
103
self .old_node .unloadwallet (wallet_name )
104
104
self .old_node .loadwallet (wallet_name )
105
+ assert_equal (self .old_node .get_wallet_rpc (wallet_name ).getwalletinfo ()["descriptors" ], False )
105
106
# Now unload so we can copy it to the master node for the migration test
106
107
self .old_node .unloadwallet (wallet_name )
107
108
if wallet_name == "" :
@@ -111,7 +112,10 @@ def migrate_and_get_rpc(self, wallet_name, **kwargs):
111
112
# Migrate, checking that rescan does not occur
112
113
with self .master_node .assert_debug_log (expected_msgs = [], unexpected_msgs = ["Rescanning" ]):
113
114
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
115
119
116
120
def test_basic (self ):
117
121
default = self .master_node .get_wallet_rpc (self .default_wallet_name )
@@ -132,10 +136,6 @@ def test_basic(self):
132
136
# Note: migration could take a while.
133
137
_ , basic0 = self .migrate_and_get_rpc ("basic0" )
134
138
135
- # Verify created descriptors
136
- assert_equal (basic0 .getwalletinfo ()["descriptors" ], True )
137
- self .assert_is_sqlite ("basic0" )
138
-
139
139
# The wallet should create the following descriptors:
140
140
# * BIP32 descriptors in the form of "0h/0h/*" and "0h/1h/*" (2 descriptors)
141
141
# * 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):
172
172
addr_gps = basic1 .listaddressgroupings ()
173
173
174
174
basic1_migrate , basic1 = self .migrate_and_get_rpc ("basic1" )
175
- assert_equal (basic1 .getwalletinfo ()["descriptors" ], True )
176
- self .assert_is_sqlite ("basic1" )
177
175
assert_equal (basic1 .getbalance (), bal )
178
176
self .assert_list_txs_equal (basic1 .listtransactions (), txs )
179
177
@@ -191,8 +189,6 @@ def test_basic(self):
191
189
default = self .master_node .get_wallet_rpc (self .default_wallet_name )
192
190
self .master_node .loadwallet ("basic1" )
193
191
basic1 = self .master_node .get_wallet_rpc ("basic1" )
194
- assert_equal (basic1 .getwalletinfo ()["descriptors" ], True )
195
- self .assert_is_sqlite ("basic1" )
196
192
assert_equal (basic1 .getbalance (), bal )
197
193
self .assert_list_txs_equal (basic1 .listtransactions (), txs )
198
194
@@ -214,8 +210,6 @@ def test_basic(self):
214
210
215
211
# Now migrate and test that we still have the same balance/transactions
216
212
_ , basic2 = self .migrate_and_get_rpc ("basic2" )
217
- assert_equal (basic2 .getwalletinfo ()["descriptors" ], True )
218
- self .assert_is_sqlite ("basic2" )
219
213
assert_equal (basic2 .getbalance (), basic2_balance )
220
214
self .assert_list_txs_equal (basic2 .listtransactions (), basic2_txs )
221
215
@@ -240,8 +234,6 @@ def test_multisig(self):
240
234
ms_info = multisig0 .addmultisigaddress (2 , [addr1 , addr2 , addr3 ])
241
235
242
236
_ , multisig0 = self .migrate_and_get_rpc ("multisig0" )
243
- assert_equal (multisig0 .getwalletinfo ()["descriptors" ], True )
244
- self .assert_is_sqlite ("multisig0" )
245
237
ms_addr_info = multisig0 .getaddressinfo (ms_info ["address" ])
246
238
assert_equal (ms_addr_info ["ismine" ], True )
247
239
assert_equal (ms_addr_info ["desc" ], ms_info ["descriptor" ])
@@ -275,8 +267,6 @@ def test_multisig(self):
275
267
# A new wallet multisig1_watchonly is created which has the multisig address
276
268
# Transaction to multisig is in multisig1_watchonly and not multisig1
277
269
_ , multisig1 = self .migrate_and_get_rpc ("multisig1" )
278
- assert_equal (multisig1 .getwalletinfo ()["descriptors" ], True )
279
- self .assert_is_sqlite ("multisig1" )
280
270
assert_equal (multisig1 .getaddressinfo (addr1 )["ismine" ], False )
281
271
assert_equal (multisig1 .getaddressinfo (addr1 )["iswatchonly" ], False )
282
272
assert_equal (multisig1 .getaddressinfo (addr1 )["solvable" ], False )
@@ -361,8 +351,6 @@ def test_other_watchonly(self):
361
351
362
352
# Migrate
363
353
_ , imports0 = self .migrate_and_get_rpc ("imports0" )
364
- assert_equal (imports0 .getwalletinfo ()["descriptors" ], True )
365
- self .assert_is_sqlite ("imports0" )
366
354
assert_raises_rpc_error (- 5 , "Invalid or non-wallet transaction id" , imports0 .gettransaction , received_watchonly_txid )
367
355
assert_raises_rpc_error (- 5 , "Invalid or non-wallet transaction id" , imports0 .gettransaction , received_sent_watchonly_utxo ['txid' ])
368
356
assert_raises_rpc_error (- 5 , "Invalid or non-wallet transaction id" , imports0 .gettransaction , sent_watchonly_txid )
@@ -918,7 +906,6 @@ def test_blank(self):
918
906
assert_equal (wallet .getwalletinfo ()["blank" ], True )
919
907
_ , wallet = self .migrate_and_get_rpc ("blank" )
920
908
assert_equal (wallet .getwalletinfo ()["blank" ], True )
921
- assert_equal (wallet .getwalletinfo ()["descriptors" ], True )
922
909
923
910
def test_avoidreuse (self ):
924
911
self .log .info ("Test that avoidreuse persists after migration" )
0 commit comments