From 84b8a224239008297a06c5e125e45bd2adb64e49 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 19 Dec 2019 16:20:12 -0300 Subject: [PATCH] comment the broadcast interruption case --- torba/torba/server/mempool.py | 1 + 1 file changed, 1 insertion(+) diff --git a/torba/torba/server/mempool.py b/torba/torba/server/mempool.py index 62449e40a..f1c162c3a 100644 --- a/torba/torba/server/mempool.py +++ b/torba/torba/server/mempool.py @@ -213,6 +213,7 @@ class MemPool: synchronized_event.clear() await self.api.on_mempool(touched, height) try: + # we wait up to `refresh_secs` but go early if a broadcast happens (which triggers wakeup event) await asyncio.wait_for(self.wakeup.wait(), timeout=self.refresh_secs) except asyncio.TimeoutError: pass