File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -238,8 +238,10 @@ def run_test(self):
238
238
# Main test loop:
239
239
# each time through the loop, generate a bunch of transactions,
240
240
# and then either mine a single new block on the tip, or some-sized reorg.
241
- # ELEMENTS: reduced iters to run in some "reasonable" amount of time (~6 hours)
242
- for i in range (6 ):
241
+ # ELEMENTS: modified to only run until successfully testing a node crash on restart
242
+ # with a maximum of 10 iterations
243
+ i = 0
244
+ while self .crashed_on_restart < 1 :
243
245
self .log .info (f"Iteration { i } , generating 2500 transactions { self .restart_counts } " )
244
246
# Generate a bunch of small-ish transactions
245
247
self .generate_small_transactions (self .nodes [3 ], 2500 , utxo_list )
@@ -288,6 +290,10 @@ def run_test(self):
288
290
for i in range (3 ):
289
291
if self .restart_counts [i ] == 0 :
290
292
self .log .warning (f"Node { i } never crashed during utxo flush!" )
293
+ if i >= 9 :
294
+ raise AssertionError (f"10 iterations without node crash, this should not happen" )
295
+ else :
296
+ i += 1
291
297
292
298
293
299
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments