non blocking mempool loop

This commit is contained in:
Jack Robison 2021-07-27 16:12:07 -04:00 committed by Victor Shyba
parent d1560ef09b
commit cd1ce32377

View file

@ -663,7 +663,9 @@ class SessionManager:
for hashX in touched.intersection(self.mempool_statuses.keys()):
self.mempool_statuses.pop(hashX, None)
touched.intersection_update(self.hashx_subscriptions_by_session.keys())
await asyncio.get_event_loop().run_in_executor(
None, touched.intersection_update, self.hashx_subscriptions_by_session.keys()
)
if touched or (height_changed and self.mempool_statuses):
notified_hashxs = 0