@@ -231,25 +231,27 @@ def run_test(self):
231231 txObjNotBroadcasted = self .nodes [0 ].gettransaction (txIdNotBroadcasted )
232232 assert_equal (self .nodes [2 ].getbalance (), node_2_bal )
233233
234-
235234 #create another tx
236235 txIdNotBroadcasted = self .nodes [0 ].sendtoaddress (self .nodes [2 ].getnewaddress (), 2 )
237236
237+ block_count = self .nodes [0 ].getblockcount ()
238+
238239 #restart the nodes with -walletbroadcast=1
239240 stop_nodes (self .nodes )
240241 wait_navcoinds ()
241- self .nodes = start_nodes (3 , self .options .tmpdir )
242+ self .nodes = start_nodes (3 , self .options .tmpdir , [[ '-staking=0' ], [ '-staking=0' ], [ '-staking=0' ]] )
242243 connect_nodes_bi (self .nodes ,0 ,1 )
243244 connect_nodes_bi (self .nodes ,1 ,2 )
244245 connect_nodes_bi (self .nodes ,2 ,0 )
245246
247+ slow_gen (self .nodes [0 ], 2 )
246248 self .sync_all ()
247- slow_gen ( self . nodes [ 0 ], 1 )
248- self .sync_all ()
249+
250+ block_count_new = self .nodes [ 0 ]. getblockcount ()
249251
250252 # We need to adjust the balance since new block/s got confirmed
251253 # And we sent 2 NAV to it
252- node_2_bal += 2 * BLOCK_REWARD + 2
254+ node_2_bal += ( block_count_new - block_count ) * BLOCK_REWARD + 2
253255
254256 #tx should be added to balance because after restarting the nodes tx should be broadcastet
255257 assert_equal (self .nodes [2 ].getbalance (), node_2_bal )
0 commit comments