@@ -99,16 +99,24 @@ def run_test(self):
9999
100100 assert_equal (len (self .nodes [0 ].gobject ("list" , "valid" , "triggers" )), 0 )
101101
102- self .log .info ("Move 1 block into sb maturity window" )
102+ self .log .info ("Move into sb maturity window" )
103103 n = sb_immaturity_window - self .nodes [0 ].getblockcount () % sb_cycle
104104 assert n >= 0
105- for _ in range (n + 1 ):
105+ for _ in range (n ):
106106 self .bump_mocktime (156 )
107107 self .generate (self .nodes [0 ], 1 , sync_fun = lambda : self .sync_blocks (self .nodes [0 :5 ]))
108108
109109 self .log .info ("Wait for new trigger and votes on non-isolated nodes" )
110110 sb_block_height = self .nodes [0 ].getblockcount () // sb_cycle * sb_cycle + sb_cycle
111111 assert_equal (sb_block_height % sb_cycle , 0 )
112+
113+ assert_equal (self .mninfo [4 ].nodeIdx , 5 )
114+ isolated_lastpaid_height = self .nodes [0 ].protx ("info" , self .mninfo [4 ].proTxHash )["state" ]["lastPaidHeight" ]
115+ if isolated_lastpaid_height == self .nodes [0 ].getblockcount () - self .mn_count + 1 :
116+ # Isolated node is the one that should create new trigger at this height,
117+ # mine a block to pick another node
118+ self .bump_mocktime (156 )
119+ self .generate (self .nodes [0 ], 1 , sync_fun = lambda : self .sync_blocks (self .nodes [0 :5 ]))
112120 self .wait_until (lambda : have_trigger_for_height (self .nodes [0 :5 ], sb_block_height ), timeout = 5 )
113121
114122 n = sb_cycle - self .nodes [0 ].getblockcount () % sb_cycle
0 commit comments