@@ -466,6 +466,7 @@ def test_htlc_accepted_hook_resolve(node_factory):
466
466
assert len (inv ) == 1 and inv [0 ]['status' ] == 'unpaid'
467
467
468
468
469
+ @pytest .mark .xfail (strict = True )
469
470
def test_htlc_accepted_hook_direct_restart (node_factory , executor ):
470
471
"""l2 restarts while it is pondering what to do with an HTLC.
471
472
"""
@@ -479,12 +480,19 @@ def test_htlc_accepted_hook_direct_restart(node_factory, executor):
479
480
f1 = executor .submit (l1 .rpc .pay , i1 )
480
481
481
482
l2 .daemon .wait_for_log (r'Holding onto an incoming htlc for 10 seconds' )
483
+ needle = l2 .daemon .logsearch_start
482
484
l2 .restart ()
483
485
486
+ # Now it should try again, *after* initializing.
487
+ # This may be before "Server started with public key" swallowed by restart()
488
+ l2 .daemon .logsearch_start = needle + 1
489
+ l2 .daemon .wait_for_log (r'hold_htlcs.py initializing' )
490
+ l2 .daemon .wait_for_log (r'Holding onto an incoming htlc for 10 seconds' )
484
491
f1 .result ()
485
492
486
493
487
494
@unittest .skipIf (not DEVELOPER , "without DEVELOPER=1, gossip v slow" )
495
+ @pytest .mark .xfail (strict = True )
488
496
def test_htlc_accepted_hook_forward_restart (node_factory , executor ):
489
497
"""l2 restarts while it is pondering what to do with an HTLC.
490
498
"""
@@ -500,8 +508,15 @@ def test_htlc_accepted_hook_forward_restart(node_factory, executor):
500
508
501
509
l2 .daemon .wait_for_log (r'Holding onto an incoming htlc for 10 seconds' )
502
510
511
+ needle = l2 .daemon .logsearch_start
503
512
l2 .restart ()
504
513
514
+ # Now it should try again, *after* initializing.
515
+ # This may be before "Server started with public key" swallowed by restart()
516
+ l2 .daemon .logsearch_start = needle + 1
517
+ l2 .daemon .wait_for_log (r'hold_htlcs.py initializing' )
518
+ l2 .daemon .wait_for_log (r'Holding onto an incoming htlc for 10 seconds' )
519
+
505
520
# Grab the file where the plugin wrote the onion and read it in for some
506
521
# additional checks
507
522
logline = l2 .daemon .wait_for_log (r'Onion written to' )
0 commit comments