File tree 1 file changed +9
-2
lines changed
1 file changed +9
-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 )
@@ -270,6 +272,11 @@ def run_test(self):
270
272
utxo_list = self .nodes [3 ].listunspent ()
271
273
self .log .debug (f"Node3 utxo count: { len (utxo_list )} " )
272
274
275
+ if i >= 9 :
276
+ raise AssertionError (f"10 iterations without node crash, this should not happen" )
277
+ else :
278
+ i += 1
279
+
273
280
# Check that the utxo hashes agree with node3
274
281
# Useful side effect: each utxo cache gets flushed here, so that we
275
282
# won't get crashes on shutdown at the end of the test.
You can’t perform that action at this time.
0 commit comments