Skip to content

Commit

Permalink
Try getting the port dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
mariano54 committed May 20, 2022
1 parent 01a000f commit ef9cd75
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/setup_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,20 +461,22 @@ async def setup_full_system(
consensus_constants,
)
timelord_iter = setup_timelord(full_node_1_port, uint16(0), vdf1_port, False, consensus_constants, b_tools)
# timelord_port = timelord.timelord.get_vdf_server_port()
timelord, _ = await timelord_iter.__anext__()
timelord_port = timelord.get_vdf_server_port()

timelord_bluebox_iter = setup_timelord(1000, uint16(0), vdf2_port, True, consensus_constants, b_tools_1)
# timelord_bluebox_port = timelord_bluebox.timelord.get_vdf_server_port()
timelord_bluebox, timelord_bluebox_server = await timelord_bluebox_iter.__anext__()
timelord_bluebox_port = timelord.get_vdf_server_port()

node_iters = [
introducer_iter,
harvester_iter,
farmer_iter,
setup_vdf_clients(shared_b_tools, shared_b_tools.config["self_hostname"], vdf1_port),
setup_vdf_clients(shared_b_tools, shared_b_tools.config["self_hostname"], timelord_port),
timelord_iter,
full_node_1_iter,
full_node_2_iter,
setup_vdf_client(shared_b_tools, shared_b_tools.config["self_hostname"], vdf2_port),
setup_vdf_client(shared_b_tools, shared_b_tools.config["self_hostname"], timelord_bluebox_port),
timelord_bluebox_iter,
]
if connect_to_daemon:
Expand All @@ -489,10 +491,8 @@ async def num_connections():

await time_out_assert_custom_interval(10, 3, num_connections, 1)

timelord, _ = await timelord_iter.__anext__()
vdf_clients = await node_iters[3].__anext__()

timelord_bluebox, timelord_bluebox_server = await timelord_bluebox_iter.__anext__()
vdf_bluebox_clients = await node_iters[7].__anext__()

ret = (
Expand Down

0 comments on commit ef9cd75

Please sign in to comment.