Skip to content

Commit

Permalink
Try port 0 timelord
Browse files Browse the repository at this point in the history
  • Loading branch information
mariano54 committed May 20, 2022
1 parent 81a37ee commit 4997faf
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions tests/setup_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,6 @@ async def setup_full_system(
introducer_iter = setup_introducer(shared_b_tools, uint16(0))
introducer, introducer_server = await introducer_iter.__anext__()

timelord1_port = find_available_listen_port("timelord1")
timelord2_port = find_available_listen_port("timelord2")
vdf1_port = find_available_listen_port("vdf1")
vdf2_port = find_available_listen_port("vdf2")

# Then start the full node so we can use the port for the farmer and timelord
full_node_1_iter = setup_full_node(
consensus_constants,
Expand Down Expand Up @@ -464,24 +459,26 @@ async def setup_full_system(
consensus_constants,
)
timelord_iter = setup_timelord(
timelord2_port, full_node_1_port, uint16(0), vdf1_port, False, consensus_constants, b_tools
uint16(0), full_node_1_port, uint16(0), uint16(0), False, consensus_constants, b_tools
)
# timelord_port = timelord.timelord.get_vdf_server_port()
timelord, _ = await timelord_iter.__anext__()
timelord_port = timelord.timelord.get_vdf_server_port()

timelord_bluebox_iter = setup_timelord(
timelord1_port, 1000, uint16(0), vdf2_port, True, consensus_constants, b_tools_1
uint16(0), 1000, uint16(0), uint16(0), 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_bluebox.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 @@ -497,10 +494,8 @@ async def num_connections():
await time_out_assert_custom_interval(10, 3, num_connections, 1)

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

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

ret = (
node_api_1,
Expand Down

0 comments on commit 4997faf

Please sign in to comment.