Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_framework.py
Show First 20 Lines • Show All 510 Lines • ▼ Show 20 Lines | class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): | ||||
def wait_for_node_exit(self, i, timeout): | def wait_for_node_exit(self, i, timeout): | ||||
self.nodes[i].process.wait(timeout) | self.nodes[i].process.wait(timeout) | ||||
def split_network(self): | def split_network(self): | ||||
""" | """ | ||||
Split the network of four nodes into nodes 0/1 and 2/3. | Split the network of four nodes into nodes 0/1 and 2/3. | ||||
""" | """ | ||||
disconnect_nodes(self.nodes[1], self.nodes[2]) | disconnect_nodes(self.nodes[1], self.nodes[2]) | ||||
disconnect_nodes(self.nodes[2], self.nodes[1]) | |||||
self.sync_all(self.nodes[:2]) | self.sync_all(self.nodes[:2]) | ||||
self.sync_all(self.nodes[2:]) | self.sync_all(self.nodes[2:]) | ||||
def join_network(self): | def join_network(self): | ||||
""" | """ | ||||
Join the (previously split) network halves together. | Join the (previously split) network halves together. | ||||
""" | """ | ||||
connect_nodes(self.nodes[1], self.nodes[2]) | connect_nodes(self.nodes[1], self.nodes[2]) | ||||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |