Example #1
0
 def add_bootstrap(self,
                   config: DockerConfig,
                   bootstrap_address: str = None) -> None:
     config.is_bootstrap = True
     config.bootstrap_address = bootstrap_address
     self._add_cl_node(config)
     self.wait_method(wait_for_node_started, 0)
     wait_for_genesis_block(self.docker_nodes[0])
Example #2
0
 def add_cl_node(
     self,
     config: DockerConfig,
     network_with_bootstrap: bool = True,
     bootstrap_address: str = None,
 ) -> None:
     with self._lock:
         if self.node_count == 0:
             raise Exception("Must create bootstrap first")
         config.bootstrap_address = (bootstrap_address
                                     or self.cl_nodes[0].node.address)
         if network_with_bootstrap:
             config.network = self.cl_nodes[0].node.config.network
         self._add_cl_node(config)