@@ -279,7 +279,10 @@ def run_test(self):
279
279
# Public helper methods. These can be accessed by the subclass test scripts.
280
280
281
281
def add_nodes (self , num_nodes , extra_args = None , * , rpchost = None , binary = None ):
282
- """Instantiate TestNode objects"""
282
+ """Instantiate TestNode objects.
283
+
284
+ Should only be called once after the nodes have been specified in
285
+ set_test_params()."""
283
286
if self .bind_to_localhost_only :
284
287
extra_confs = [["bind=127.0.0.1" ]] * num_nodes
285
288
else :
@@ -292,7 +295,19 @@ def add_nodes(self, num_nodes, extra_args=None, *, rpchost=None, binary=None):
292
295
assert_equal (len (extra_args ), num_nodes )
293
296
assert_equal (len (binary ), num_nodes )
294
297
for i in range (num_nodes ):
295
- self .nodes .append (TestNode (i , get_datadir_path (self .options .tmpdir , i ), rpchost = rpchost , timewait = self .rpc_timewait , bitcoind = binary [i ], bitcoin_cli = self .options .bitcoincli , mocktime = self .mocktime , coverage_dir = self .options .coveragedir , extra_conf = extra_confs [i ], extra_args = extra_args [i ], use_cli = self .options .usecli ))
298
+ self .nodes .append (TestNode (
299
+ i ,
300
+ get_datadir_path (self .options .tmpdir , i ),
301
+ rpchost = rpchost ,
302
+ timewait = self .rpc_timewait ,
303
+ bitcoind = binary [i ],
304
+ bitcoin_cli = self .options .bitcoincli ,
305
+ mocktime = self .mocktime ,
306
+ coverage_dir = self .options .coveragedir ,
307
+ extra_conf = extra_confs [i ],
308
+ extra_args = extra_args [i ],
309
+ use_cli = self .options .usecli ,
310
+ ))
296
311
297
312
def start_node (self , i , * args , ** kwargs ):
298
313
"""Start a bitcoind"""
0 commit comments