@@ -353,9 +353,9 @@ def setup_network(self):
353
353
# See fPreferredDownload in net_processing.
354
354
#
355
355
# If further outbound connections are needed, they can be added at the beginning of the test with e.g.
356
- # connect_nodes( self.nodes[1] , 2)
356
+ # self.connect_nodes(1 , 2)
357
357
for i in range (self .num_nodes - 1 ):
358
- connect_nodes ( self .nodes [ i + 1 ] , i )
358
+ self .connect_nodes ( i + 1 , i )
359
359
self .sync_all ()
360
360
361
361
def setup_nodes (self ):
@@ -532,19 +532,25 @@ def restart_node(self, i, extra_args=None):
532
532
def wait_for_node_exit (self , i , timeout ):
533
533
self .nodes [i ].process .wait (timeout )
534
534
535
+ def connect_nodes (self , a , b ):
536
+ connect_nodes (self .nodes [a ], b )
537
+
538
+ def disconnect_nodes (self , a , b ):
539
+ disconnect_nodes (self .nodes [a ], b )
540
+
535
541
def split_network (self ):
536
542
"""
537
543
Split the network of four nodes into nodes 0/1 and 2/3.
538
544
"""
539
- disconnect_nodes ( self .nodes [ 1 ] , 2 )
545
+ self .disconnect_nodes ( 1 , 2 )
540
546
self .sync_all (self .nodes [:2 ])
541
547
self .sync_all (self .nodes [2 :])
542
548
543
549
def join_network (self ):
544
550
"""
545
551
Join the (previously split) network halves together.
546
552
"""
547
- connect_nodes ( self .nodes [ 1 ] , 2 )
553
+ self .connect_nodes ( 1 , 2 )
548
554
self .sync_all ()
549
555
550
556
def sync_blocks (self , nodes = None , wait = 1 , timeout = 60 ):
0 commit comments