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