Skip to content

Commit 56bef2c

Browse files
committed
debug ci
1 parent 3ae3005 commit 56bef2c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

chia/server/server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ async def start_client(
425425
"""
426426
if self.is_duplicate_or_self_connection(target_node):
427427
self.log.warning(f"cannot connect to {target_node.host}, duplicate/self connection")
428+
print(f"cannot connect to {target_node.host}, duplicate/self connection")
428429
return False
429430

430431
if target_node.host in self.banned_peers and time.time() < self.banned_peers[target_node.host]:
@@ -452,15 +453,19 @@ async def start_client(
452453
)
453454
except ServerDisconnectedError:
454455
self.log.debug(f"Server disconnected error connecting to {url}. Perhaps we are banned by the peer.")
456+
print(f"Server disconnected error connecting to {url}. Perhaps we are banned by the peer.")
455457
return False
456458
except ClientResponseError as e:
457459
self.log.warning(f"Connection failed to {url}. Error: {e}")
460+
print(f"Connection failed to {url}. Error: {e}")
458461
return False
459462
except asyncio.TimeoutError:
460463
self.log.debug(f"Timeout error connecting to {url}")
464+
print(f"Timeout error connecting to {url}")
461465
return False
462466
if ws is None:
463467
self.log.warning(f"Connection failed to {url}. ws was None")
468+
print(f"Connection failed to {url}. ws was None")
464469
return False
465470

466471
ssl_object = ws.get_extra_info("ssl_object")

chia/server/start_service.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def __init__(
149149
async def _connect_peers_task_handler(self) -> None:
150150
resolved_peers: dict[UnresolvedPeerInfo, PeerInfo] = {}
151151
prefer_ipv6 = self.config.get("prefer_ipv6", False)
152+
print(f"connect peers task started {self._connect_peers}")
152153
while True:
153154
for unresolved in self._connect_peers:
154155
print(f"try peer {unresolved}")
@@ -164,15 +165,15 @@ async def _connect_peers_task_handler(self) -> None:
164165
resolved_peers[unresolved] = resolved
165166

166167
if any(connection.peer_info == resolved for connection in self._server.all_connections.values()):
167-
print("step 1")
168+
print(f"step 1. {resolved} {self._server.all_connections.values()}")
168169
continue
169170
if any(
170171
connection.peer_info.host == resolved.host and connection.peer_server_port == resolved.port
171172
for connection in self._server.all_connections.values()
172173
):
173174
print("step 2")
174175
continue
175-
176+
print(f"connect to {resolved}")
176177
if not await self._server.start_client(resolved, None):
177178
self._log.info(f"Failed to connect to {resolved}")
178179
print(f"Failed to connect to {resolved}")

0 commit comments

Comments
 (0)