remove unused things
This commit is contained in:
parent
f04c5ee902
commit
822f53c888
1 changed files with 1 additions and 8 deletions
|
@ -108,7 +108,7 @@ class BaseNetwork:
|
|||
try:
|
||||
self.client = await self.session_pool.wait_for_fastest_session()
|
||||
self._update_remote_height((await self.subscribe_headers(),))
|
||||
log.info("Successfully connected to SPV wallet server: %s:%d", *self.client.server)
|
||||
log.info("Switching to SPV wallet server: %s:%d", *self.client.server)
|
||||
self._on_connected_controller.add(True)
|
||||
self.client.on_disconnected.listen(lambda _: self.switch_event.set())
|
||||
await self.switch_event.wait()
|
||||
|
@ -118,8 +118,6 @@ class BaseNetwork:
|
|||
raise
|
||||
except asyncio.TimeoutError:
|
||||
pass
|
||||
except Exception: # pylint: disable=broad-except
|
||||
log.exception("Exception while trying to find a server!")
|
||||
|
||||
async def stop(self):
|
||||
self.running = False
|
||||
|
@ -143,10 +141,6 @@ class BaseNetwork:
|
|||
else:
|
||||
raise ConnectionError("Attempting to send rpc request when connection is not available.")
|
||||
|
||||
async def probe_session(self, session: ClientSession):
|
||||
await session.send_request('server.banner')
|
||||
return session
|
||||
|
||||
def _update_remote_height(self, header_args):
|
||||
self.remote_height = header_args[0]["height"]
|
||||
|
||||
|
@ -215,7 +209,6 @@ class SessionPool:
|
|||
task.add_done_callback(lambda _: self.ensure_connections())
|
||||
self.sessions[session] = task
|
||||
|
||||
|
||||
async def wait_for_fastest_session(self):
|
||||
while True:
|
||||
fastest = self.fastest_session
|
||||
|
|
Loading…
Add table
Reference in a new issue