@@ -135,11 +135,13 @@ def run_test(self):
135
135
self .log .info ("Backing up" )
136
136
137
137
self .nodes [0 ].backupwallet (os .path .join (self .nodes [0 ].datadir , 'wallet.bak' ))
138
- self .nodes [0 ].dumpwallet (os .path .join (self .nodes [0 ].datadir , 'wallet.dump' ))
139
138
self .nodes [1 ].backupwallet (os .path .join (self .nodes [1 ].datadir , 'wallet.bak' ))
140
- self .nodes [1 ].dumpwallet (os .path .join (self .nodes [1 ].datadir , 'wallet.dump' ))
141
139
self .nodes [2 ].backupwallet (os .path .join (self .nodes [2 ].datadir , 'wallet.bak' ))
142
- self .nodes [2 ].dumpwallet (os .path .join (self .nodes [2 ].datadir , 'wallet.dump' ))
140
+
141
+ if not self .options .descriptors :
142
+ self .nodes [0 ].dumpwallet (os .path .join (self .nodes [0 ].datadir , 'wallet.dump' ))
143
+ self .nodes [1 ].dumpwallet (os .path .join (self .nodes [1 ].datadir , 'wallet.dump' ))
144
+ self .nodes [2 ].dumpwallet (os .path .join (self .nodes [2 ].datadir , 'wallet.dump' ))
143
145
144
146
self .log .info ("More transactions" )
145
147
for _ in range (5 ):
@@ -183,29 +185,30 @@ def run_test(self):
183
185
assert_equal (self .nodes [1 ].getbalance (), balance1 )
184
186
assert_equal (self .nodes [2 ].getbalance (), balance2 )
185
187
186
- self .log .info ("Restoring using dumped wallet" )
187
- self .stop_three ()
188
- self .erase_three ()
188
+ if not self .options .descriptors :
189
+ self .log .info ("Restoring using dumped wallet" )
190
+ self .stop_three ()
191
+ self .erase_three ()
189
192
190
- #start node2 with no chain
191
- shutil .rmtree (os .path .join (self .nodes [2 ].datadir , self .chain , 'blocks' ))
192
- shutil .rmtree (os .path .join (self .nodes [2 ].datadir , self .chain , 'chainstate' ))
193
+ #start node2 with no chain
194
+ shutil .rmtree (os .path .join (self .nodes [2 ].datadir , self .chain , 'blocks' ))
195
+ shutil .rmtree (os .path .join (self .nodes [2 ].datadir , self .chain , 'chainstate' ))
193
196
194
- self .start_three ()
197
+ self .start_three ()
195
198
196
- assert_equal (self .nodes [0 ].getbalance (), 0 )
197
- assert_equal (self .nodes [1 ].getbalance (), 0 )
198
- assert_equal (self .nodes [2 ].getbalance (), 0 )
199
+ assert_equal (self .nodes [0 ].getbalance (), 0 )
200
+ assert_equal (self .nodes [1 ].getbalance (), 0 )
201
+ assert_equal (self .nodes [2 ].getbalance (), 0 )
199
202
200
- self .nodes [0 ].importwallet (os .path .join (self .nodes [0 ].datadir , 'wallet.dump' ))
201
- self .nodes [1 ].importwallet (os .path .join (self .nodes [1 ].datadir , 'wallet.dump' ))
202
- self .nodes [2 ].importwallet (os .path .join (self .nodes [2 ].datadir , 'wallet.dump' ))
203
+ self .nodes [0 ].importwallet (os .path .join (self .nodes [0 ].datadir , 'wallet.dump' ))
204
+ self .nodes [1 ].importwallet (os .path .join (self .nodes [1 ].datadir , 'wallet.dump' ))
205
+ self .nodes [2 ].importwallet (os .path .join (self .nodes [2 ].datadir , 'wallet.dump' ))
203
206
204
- self .sync_blocks ()
207
+ self .sync_blocks ()
205
208
206
- assert_equal (self .nodes [0 ].getbalance (), balance0 )
207
- assert_equal (self .nodes [1 ].getbalance (), balance1 )
208
- assert_equal (self .nodes [2 ].getbalance (), balance2 )
209
+ assert_equal (self .nodes [0 ].getbalance (), balance0 )
210
+ assert_equal (self .nodes [1 ].getbalance (), balance1 )
211
+ assert_equal (self .nodes [2 ].getbalance (), balance2 )
209
212
210
213
# Backup to source wallet file must fail
211
214
sourcePaths = [
0 commit comments