Browse Source
lnrater: use network.asyncio_loop instead of asyncio.get_event_loop()
fixes #5376
patch-4
SomberNight
4 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
2 additions and
2 deletions
-
electrum/lnrater.py
|
|
@ -91,14 +91,14 @@ class LNRater(Logger): |
|
|
|
self._last_progress_percent = 0 |
|
|
|
|
|
|
|
def maybe_analyze_graph(self): |
|
|
|
loop = asyncio.get_event_loop() |
|
|
|
loop = self.network.asyncio_loop |
|
|
|
fut = asyncio.run_coroutine_threadsafe(self._maybe_analyze_graph(), loop) |
|
|
|
fut.result() |
|
|
|
|
|
|
|
def analyze_graph(self): |
|
|
|
"""Forces a graph analysis, e.g., due to external triggers like |
|
|
|
the graph info reaching 50%.""" |
|
|
|
loop = asyncio.get_event_loop() |
|
|
|
loop = self.network.asyncio_loop |
|
|
|
fut = asyncio.run_coroutine_threadsafe(self._analyze_graph(), loop) |
|
|
|
fut.result() |
|
|
|
|
|
|
|