Skip to content

Commit eb5dd4f

Browse files
author
Neil Booth
committed
Display which peer dropped the connection
Require aiorpcx 0.20.2 which has TaskGroup improvements
1 parent 2648d39 commit eb5dd4f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

electrumx/server/controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ async def serve(self, shutdown_event):
8686
'''Start the RPC server and wait for the mempool to synchronize. Then
8787
start serving external clients.
8888
'''
89-
if not (0, 20) <= aiorpcx_version < (0, 21):
90-
raise RuntimeError('aiorpcX version 0.20 is required')
89+
if not (0, 20, 2) <= aiorpcx_version < (0, 21):
90+
raise RuntimeError('aiorpcX version 0.20.2+ is required')
9191

9292
env = self.env
9393
min_str, max_str = env.coin.SESSIONCLS.protocol_min_max_strings()

electrumx/server/peers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ async def _should_drop_peer(self, peer):
258258
self.logger.info(f'{peer_text} {e}')
259259
except CancelledError:
260260
# A send_request was cancelled
261-
self.logger.error('peer dropped verification connection')
261+
self.logger.error(f'{peer_text} dropped verification connection')
262262
peer.mark_bad()
263263
break
264264

@@ -348,7 +348,7 @@ async def _verify_peer(self, session, peer):
348348
(session, peer))
349349

350350
# Propagate failed task exception
351-
g.result()
351+
g.results # pylint:disable=W0104
352352

353353
# Process reported peers if remote peer is good
354354
peers = peers_task.result()

0 commit comments

Comments
 (0)