From bb6166c62d25a95eef34735582fe44eac3e3991e Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 28 Jul 2022 12:02:47 -0400 Subject: [PATCH] expose protocol class for tests to override --- hub/herald/session.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hub/herald/session.py b/hub/herald/session.py index 73a6dbd..2868fc8 100644 --- a/hub/herald/session.py +++ b/hub/herald/session.py @@ -204,7 +204,7 @@ class SessionManager: self.notified_height: typing.Optional[int] = None # Cache some idea of room to avoid recounting on each subscription self.subs_room = 0 - + self.protocol_class = LBRYElectrumX self.session_event = Event() # Search index @@ -262,7 +262,7 @@ class SessionManager: loop = asyncio.get_event_loop() if kind == 'TCP': - protocol_class = LBRYElectrumX + protocol_class = self.protocol_class else: raise ValueError(kind) protocol_factory = partial(protocol_class, self, kind)