File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,11 @@ def run_test(self):
256
256
self .log .debug ("Mining longer tip" )
257
257
block_hashes = []
258
258
while current_height + 1 > self .nodes [3 ].getblockcount ():
259
- block_hashes .extend (self .nodes [3 ].generate (min (10 , current_height + 1 - self .nodes [3 ].getblockcount ())))
259
+ block_hashes .extend (self .nodes [3 ].generatetoaddress (
260
+ nblocks = min (10 , current_height + 1 - self .nodes [3 ].getblockcount ()),
261
+ # new address to avoid mining a block that has just been invalidated
262
+ address = self .nodes [3 ].getnewaddress (),
263
+ ))
260
264
self .log .debug ("Syncing %d new blocks..." , len (block_hashes ))
261
265
self .sync_node3blocks (block_hashes )
262
266
utxo_list = self .nodes [3 ].listunspent ()
@@ -281,5 +285,6 @@ def run_test(self):
281
285
if self .restart_counts [i ] == 0 :
282
286
self .log .warning ("Node %d never crashed during utxo flush!" , i )
283
287
288
+
284
289
if __name__ == "__main__" :
285
290
ChainstateWriteCrashTest ().main ()
You can’t perform that action at this time.
0 commit comments