expose protocol class for tests to override
This commit is contained in:
parent
08f25a7c50
commit
bb6166c62d
1 changed files with 2 additions and 2 deletions
|
@ -204,7 +204,7 @@ class SessionManager:
|
||||||
self.notified_height: typing.Optional[int] = None
|
self.notified_height: typing.Optional[int] = None
|
||||||
# Cache some idea of room to avoid recounting on each subscription
|
# Cache some idea of room to avoid recounting on each subscription
|
||||||
self.subs_room = 0
|
self.subs_room = 0
|
||||||
|
self.protocol_class = LBRYElectrumX
|
||||||
self.session_event = Event()
|
self.session_event = Event()
|
||||||
|
|
||||||
# Search index
|
# Search index
|
||||||
|
@ -262,7 +262,7 @@ class SessionManager:
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
if kind == 'TCP':
|
if kind == 'TCP':
|
||||||
protocol_class = LBRYElectrumX
|
protocol_class = self.protocol_class
|
||||||
else:
|
else:
|
||||||
raise ValueError(kind)
|
raise ValueError(kind)
|
||||||
protocol_factory = partial(protocol_class, self, kind)
|
protocol_factory = partial(protocol_class, self, kind)
|
||||||
|
|
Loading…
Reference in a new issue