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