Allow debugging nodes that will be added in the future (#393)

This commit is contained in:
Amaury Chamayou 2019-09-25 14:05:07 +01:00 коммит произвёл Alex
Родитель 293eb3bd18
Коммит cdf40fcc2b
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -125,13 +125,14 @@ class Network:
self.members = []
self.hosts = hosts
self.net_cert = []
self.dbg_nodes = dbg_nodes or []
if create_nodes:
for local_node_id, host in enumerate(hosts):
local_node_id_ = local_node_id + node_offset
self.create_node(
local_node_id_,
host,
debug=str(local_node_id_) in (dbg_nodes or []),
debug=str(local_node_id_) in self.dbg_nodes,
perf=str(local_node_id_) in (perf_nodes or []),
)
@ -305,7 +306,10 @@ class Network:
def create_and_add_node(self, lib_name, host, args):
local_node_id = self.get_next_local_node_id()
new_node = self.create_node(local_node_id, host)
new_node = self.create_node(
local_node_id, host, debug=str(local_node_id) in self.dbg_nodes
)
if self.add_node(new_node, lib_name, None, args) is False:
return None